From 13c3cb2b23e27d74cdd193af08949652d6acd5b8 Mon Sep 17 00:00:00 2001 From: Barry Tulchinsky Date: Sat, 21 Dec 2013 16:49:52 -0500 Subject: [PATCH 1/3] fix another error in the spec tests for utimes --- tests/spec/fs.utimes.spec.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/spec/fs.utimes.spec.js b/tests/spec/fs.utimes.spec.js index 6e085e0..774cf6c 100644 --- a/tests/spec/fs.utimes.spec.js +++ b/tests/spec/fs.utimes.spec.js @@ -236,21 +236,19 @@ define(["IDBFS"], function(IDBFS) { }); it ('should update atime and mtime of directory path', function (error) { - var complete = false + var complete = false; var _error; - - //Note: required as the filesystem somehow gets removed from the Jasmine object - var fs = this.fs; + var that = this; var _stat; var atime = Date.parse('1 Oct 2000 15:33:22'); var mtime = Date.parse('30 Sep 2000 06:43:54'); - fs.mkdir('/testdir', function (error) { + that.fs.mkdir('/testdir', function (error) { if (error) throw error; - fs.utimes('/testdir', atime, mtime, function (error) { + that.fs.utimes('/testdir', atime, mtime, function (error) { _error = error; fs.stat('/testdir', function (error, stat) { @@ -270,7 +268,6 @@ define(["IDBFS"], function(IDBFS) { expect(_error).toEqual(null); expect(_stat.atime).toEqual(atime); expect(_stat.mtime).toEqual(mtime); - delete fs; }); }); From 95f3547cfb035e22c638c18133e075c3e47a3f83 Mon Sep 17 00:00:00 2001 From: Barry Tulchinsky Date: Sat, 21 Dec 2013 16:49:52 -0500 Subject: [PATCH 2/3] fix another error in the spec tests for utimes --- tests/spec/fs.utimes.spec.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/spec/fs.utimes.spec.js b/tests/spec/fs.utimes.spec.js index 3f5fd79..e4e15d4 100644 --- a/tests/spec/fs.utimes.spec.js +++ b/tests/spec/fs.utimes.spec.js @@ -236,21 +236,19 @@ define(["Filer"], function(Filer) { }); it ('should update atime and mtime of directory path', function (error) { - var complete = false + var complete = false; var _error; - - //Note: required as the filesystem somehow gets removed from the Jasmine object - var fs = this.fs; + var that = this; var _stat; var atime = Date.parse('1 Oct 2000 15:33:22'); var mtime = Date.parse('30 Sep 2000 06:43:54'); - fs.mkdir('/testdir', function (error) { + that.fs.mkdir('/testdir', function (error) { if (error) throw error; - fs.utimes('/testdir', atime, mtime, function (error) { + that.fs.utimes('/testdir', atime, mtime, function (error) { _error = error; fs.stat('/testdir', function (error, stat) { @@ -270,7 +268,6 @@ define(["Filer"], function(Filer) { expect(_error).toEqual(null); expect(_stat.atime).toEqual(atime); expect(_stat.mtime).toEqual(mtime); - delete fs; }); }); From 84c859a14c187c4024ea4e6e435f65a7212e04a7 Mon Sep 17 00:00:00 2001 From: Barry Tulchinsky Date: Wed, 15 Jan 2014 21:35:42 -0500 Subject: [PATCH 3/3] test case fix --- tests/spec/fs.utimes.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/spec/fs.utimes.spec.js b/tests/spec/fs.utimes.spec.js index e4e15d4..b7079bd 100644 --- a/tests/spec/fs.utimes.spec.js +++ b/tests/spec/fs.utimes.spec.js @@ -251,7 +251,7 @@ define(["Filer"], function(Filer) { that.fs.utimes('/testdir', atime, mtime, function (error) { _error = error; - fs.stat('/testdir', function (error, stat) { + that.fs.stat('/testdir', function (error, stat) { if (error) throw error; _stat = stat;