« index

Coverage for /Users/kris/q-io/spec/fs/issues/1-spec.js : 100%

31 lines | 31 run | 0 missing | 0 partial | 7 blocks | 7 blocks run | 0 blocks missing

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

  require("../../lib/jasmine-promise");
  var Q = require("q");
  var FS = require("../../../fs");
  
  describe("write and remove", function () {
  
      it("should write and remove a file", function () {
  
          var fixture = FS.join(__dirname, "fixture.txt");
  
          return FS.write(fixture, "1234")
          .then(function (result) {
              expect(result).toBe(undefined);
          })
  
          .then(function () {
              return FS.remove(fixture);
          })
          .then(function (result) {
              expect(result).toBe(undefined);
          })
  
          .then(function () {
              return FS.exists(fixture)
          })
          .then(function (exists) {
              expect(exists).toBe(false);
          })
  
      });
  });
« index | cover.io