diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..d506747 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +tests/dist/ \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..84787e1 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,32 @@ +{ + "env": { + "browser": true, + "commonjs": true, + "es6": true, + "mocha": true, + "node": true + }, + "extends": "eslint:recommended", + "parserOptions": { + "ecmaVersion": 2017, + "sourceType": "module" + }, + "rules": { + "indent": [ + "error", + 2 + ], + "linebreak-style": [ + "error", + "unix" + ], + "quotes": [ + "error", + "single" + ], + "semi": [ + "error", + "always" + ] + } +} diff --git a/.gitignore b/.gitignore index 9878022..19af525 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,7 @@ bower_components .env *~ dist/filer-issue225.js + +# Parcel build dirs +.cache +tests/dist diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 840dc67..498273f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,60 +9,28 @@ message and I'll update it. ## Setup -The Filer build system is based on [grunt](http://gruntjs.com/). To get a working build system -do the following: +To get a working build system do the following: ``` npm install -npm install -g grunt-cli ``` -You can now run the following grunt tasks: -* `grunt jshint` will run [JSHint](http://www.jshint.com/) on your code (do this before submitting a pull request) to catch errors -* `grunt develop` will create a single file version of the library for testing in `dist/filer.js` -* `grunt release` like `develop` but will also create a minified version of the library in `dist/filer.min.js` -* `grunt test` or `grunt test-node` will run [JSHint](http://www.jshint.com/) on your code and the test suite in the context of `nodejs` -* `grunt test-browser` will run [JSHint](http://www.jshint.com/) and start a localhost server on port `1234`. Navigating to `localhost:1234/tests/index.html` will run the test suite in the context of the browser. **NOTE:** When finished, you will have to manually shut off the server by pressing `cmd/ctrl`+`c` in the same terminal session you ran `grunt test-browser`. +You can now run the following `npm` scripts: + +* `npm test` will build Filer and the tests in `tests/` and start a web server at http://localhost:1234 where you can run the tests. +* `npm lint` will run `eslint` on the `src` and `tests` directories. +* `npm run build` will bundle two versions of Filer: `dist/filer.js` (unminified) and `dist/filer.min.js` (minified) as well as source map files. Once you've done some hacking and you'd like to have your work merged, you'll need to make a pull request. If you're patch includes code, make sure to check that all the unit tests pass, including any new tests you wrote. Finally, make sure you add yourself to the `AUTHORS` file. -======= -### Releasing a new version -======= - -`grunt publish` will: - -* Run the `grunt release` task -* Bump `bower.json` & `package.json` version numbers according to a [Semver](http://semver.org/) compatible scheme (see ["How to Publish"](#how-to-publish) below) -* Create a git tag at the new version number -* Create a release commit including `dist/filer.js`, `dist/filer.min.js`, `bower.json` and `package.json` -* Push tag & commit to `origin/develop` -* Update the `gh-pages` branch with the contents of the `develop` branch -* Force push the `gh-pages` branch to `origin/gh-pages` -* Publish the new version of the module to NPM - -#### How to configure -1. Copy `env.sample` to `.env` -2. Modify as needed, or leave alone for defaults - -#### How to Publish -`grunt publish` can be run in four ways: - -1. `grunt publish` - does a patch (x.x.X) bump -2. `grunt publish:patch` - also does a patch (x.x.X) bump -3. `grunt publish:minor` - does a minor (x.X.x) bump -4. `grunt publish:major` - does a major (X.x.x) bump - -The user *must* be on their local `develop` branch before running any form of `grunt publish`, or else the task will fail loudly. - ======= ## Tests Tests are writting using [Mocha](http://visionmedia.github.io/mocha/) and [Chai](http://chaijs.com/api/bdd/). -You can run the tests in your browser by running `grunt test-browser` and opening the `tests` directory @ `http://localhost:1234/tests`, or in a nodejs context by running `grunt test`. +You can run the tests in your browser by running `npm test` and opening your browser to `http://localhost:1234`. There are a number of configurable options for the test suite, which are set via query string params. First, you can choose which filer source to use (i.e., src/, dist/filer-test.js, dist/filer.js or dist/filer.min.js). @@ -84,129 +52,3 @@ an example. ## Communication If you'd like to talk to someone about the project, you can reach us on irc.mozilla.org in the #filer or #mofodev channel. Look for "ack" or "humph". - -## Grunt tasks - -The six grunt tasks Filer provides for development are detailed here, including a description of the third party tasks that are used to complete the process in the order they are used. For details on the grunt task running framework, see [http://gruntjs.com/](http://gruntjs.com/). - -Individual targets are shown *in italics*: - -### 1. grunt develop - -*This task is responsible for producing the Filer distribution files.* - -#### `browserify` ([https://www.npmjs.org/package/grunt-browserify](https://www.npmjs.org/package/grunt-browserify)) - -* *:filerDist*: Combines the filer source tree into a single distribution file for the bower releases. - -#### `uglify` ([https://www.npmjs.com/package/grunt-contrib-uglify](https://www.npmjs.com/package/grunt-contrib-uglify)) - -* Adds a banner to ensure every release's distribution files are unique (**NOTE**: This is required for a successful `grunt release`) - -### 2. grunt release - -*This task runs the `grunt test`, and `grunt develop` tasks in one command, preventing new distribution files from being generated if tests fail.* - -### 3. grunt build-tests - -*This task generates single-file versions of the test suite and a separate Filer distribution file for testing Filer's compatibility with the [requirejs module system](http://requirejs.og/).* - -#### `clean` ([https://www.npmjs.com/package/grunt-contrib-clean](https://www.npmjs.com/package/grunt-contrib-clean)) - -* Deletes the current browserified test files (see [http://browserify.org/](http://browserify.org/) for more details) - -#### `browserify` ([https://www.npmjs.org/package/grunt-browserify](https://www.npmjs.org/package/grunt-browserify)) - -* *:filerPerf*: Combines performance tests into a single distribution file for browser performance benchmarks -* *:filerTest*: Combines unit tests into a single distribution file for testing Filer in the browser -* *:filerIssue225*: Used to generate a distribution file for testing based on the current state of the code, without affecting the current release's distribution file - -### 4. grunt test-node - -*This task lints and tests the Filer library in a nodejs context, aborting if any of the subtasks fail.* - -#### `jshint` ([https://www.npmjs.com/package/grunt-contrib-jshint](https://www.npmjs.com/package/grunt-contrib-jshint)) - -* Used to lint the source files. - -#### `browserify` ([https://www.npmjs.org/package/grunt-browserify](https://www.npmjs.org/package/grunt-browserify)) - -* *:filerIssue225*: Used to generate a distribution file for testing based on the current state of the code, without affecting the current release's distribution file - -#### `shell` ([https://www.npmjs.com/package/grunt-shell](https://www.npmjs.com/package/grunt-shell)) - -* *:mocha*: Runs Filer's test suite on nodejs using the mocha test framework from the command line interface - -### 5. grunt test-browser - -*This task generates all the files necessary for running Filer's test suite in a browser, and starts a simple HTTP server to access the tests from your browser of choice* - -#### `jshint` ([https://www.npmjs.com/package/grunt-contrib-jshint](https://www.npmjs.com/package/grunt-contrib-jshint)) - -* Used to lint the source files. - -#### `build-tests` ([#3-grunt-build-tests](#3-grunt-build-tests)) - -* Generates single-file versions of the test suite and a separate Filer distribution file for testing Filer's compatibility with the [requirejs module system](http://requirejs.og/). - -#### `connect` ([https://www.npmjs.com/package/grunt-contrib-connect](https://www.npmjs.com/package/grunt-contrib-connect)) - -* *:serverForBrowser*: Starts a simple HTTP server pointing at the root of the Filer directory. Browsing to the '/tests/' directory will run the Filer tests in the browser. - -### 6. grunt publish - -#### `prompt` ([https://www.npmjs.com/package/grunt-prompt](https://www.npmjs.com/package/grunt-prompt)) - -* *confirm*: Interactive prompt task, used to confirm the kind of version release being requested by the user, and to give them an opportunity to abort the release. The prompt message is generated in the `grunt publish` task itself. - -#### `npm-checkbranch` ([https://github.com/sedge/grunt-npm/tree/branchcheck](https://github.com/sedge/grunt-npm/tree/branchcheck)) - -* Causes `grunt publish` to fail out early if the user is not on the `develop` branch - -#### `release` ([#2-grunt-release](#2-grunt-release)) - -* Runs the `grunt test`, and `grunt develop` tasks in one command, preventing new distribution files from being generated if tests fail. - -#### `bump` ([https://www.npmjs.com/package/grunt-bump](https://www.npmjs.com/package/grunt-bump)) - -* Responsible for creating the latest tag and release commit of the repo. In order, it: - 1. Bumps the version number in Filer's `package.json` and `bower.json` files - 2. Creates a release commit including updated manifest files and new filer distribution files - 3. Tags the repo at this new version - 4. Pushes the tag and the release commit upstream - -#### `build-tests` ([#3-grunt-build-tests](#3-grunt-build-tests)) - -* Generates single-file versions of the test suite and a separate Filer distribution file for testing Filer's compatibility with the [requirejs module system](http://requirejs.og/). - -#### `usebanner` ([https://www.npmjs.com/package/grunt-banner](https://www.npmjs.com/package/grunt-banner)) -* *:publish*: Adds a banner to the generated test and performance test files. The banner contents are generated as part of the `grunt publish` task itself. - -#### `gitadd` ([https://www.npmjs.com/package/grunt-git](https://www.npmjs.com/package/grunt-git)) -* *:publish*: Adds the Filer test files to git's staging area to allow us to stash it in the next step - -#### `gitstash` ([https://www.npmjs.com/package/grunt-git](https://www.npmjs.com/package/grunt-git)) -* *:publish*: Stashes the Filer test files in preparation for switching to the `gh-pages` branch in the next step - -#### `gitcheckout` ([https://www.npmjs.com/package/grunt-git](https://www.npmjs.com/package/grunt-git)) -* *:publish*: Checks out the `gh-pages` branch to prepare for committing the newly generated test files in the next three steps - -#### `gitrm` ([https://www.npmjs.com/package/grunt-git](https://www.npmjs.com/package/grunt-git)) -* *:publish*: Equivalent of `git rm -f`, this task forces a removal of the existing versions of the generated test files on this branch in preparation for the next step. - -#### `gitstash` ([https://www.npmjs.com/package/grunt-git](https://www.npmjs.com/package/grunt-git)) -* *:pop*: Equivalent of `git stash pop`, this task reintroduces the staging area containing the newest version of the generated test files. - -#### `gitcommit` ([https://www.npmjs.com/package/grunt-git](https://www.npmjs.com/package/grunt-git)) -* *:publish*: This task commits the current staging area containing the newly generated test files. The commit message is generated during the `grunt publish` task itself. - -#### `gitpush` ([https://www.npmjs.com/package/grunt-git](https://www.npmjs.com/package/grunt-git)) -* *:publish*: This task pushes the local `gh-pages` branch to the remote specified in Filer's .env file as FILER_UPSTREAM_REMOTE_NAME. - -#### `gitcheckout` ([https://www.npmjs.com/package/grunt-git](https://www.npmjs.com/package/grunt-git)) -* *:revert*: This task checks out back to the main branch ('develop' by default, specified in the .env as FILER_UPSTREAM_BRANCH) - -#### `npm-publish` ([https://www.npmjs.com/package/grunt-npm](https://www.npmjs.com/package/grunt-npm)) - -* Publishes the latest release to NPM - diff --git a/bower.json b/bower.json deleted file mode 100644 index 4c6e8ad..0000000 --- a/bower.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "filer", - "version": "0.0.44", - "main": "dist/filer.js", - "ignore": [ - "build", - "examples", - "package.json", - "tests", - "gruntfile.js", - "node_modules", - "src", - "tools" - ] -} diff --git a/dist/filer-perf.js b/dist/filer-perf.js deleted file mode 100644 index d59041c..0000000 --- a/dist/filer-perf.js +++ /dev/null @@ -1,10243 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Filer = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= arr.length) { - callback(); - } - else { - iterate(); - } - } - }); - }; - iterate(); - }; - async.forEachSeries = async.eachSeries; - - // AMD / RequireJS - if (typeof define !== 'undefined' && define.amd) { - define([], function () { - return async; - }); - } - // Node.js - else if (typeof module !== 'undefined' && module.exports) { - module.exports = async; - } - // included directly via - - - + + +
+ + + - - - -
+ + + diff --git a/tests/index.js b/tests/index.js index 2a3f313..7b32430 100644 --- a/tests/index.js +++ b/tests/index.js @@ -66,7 +66,6 @@ require("./spec/node-js/simple/test-fs-watch"); require("./spec/node-js/simple/test-fs-watch-recursive"); // Regressions, Bugs -// NOTE: bugs/issue225.js has to be run outside this step, see gruntfile.js require("./bugs/issue105"); require("./bugs/issue106"); require("./bugs/issue239"); diff --git a/tests/lib/indexeddb.js b/tests/lib/indexeddb.js index f09ae5b..4a2b3fe 100644 --- a/tests/lib/indexeddb.js +++ b/tests/lib/indexeddb.js @@ -1,4 +1,4 @@ -var Filer = require("../.."); +var Filer = require('../../src'); var indexedDB = global.indexedDB || global.mozIndexedDB || diff --git a/tests/lib/memory.js b/tests/lib/memory.js index ccfa2cd..25f5f6c 100644 --- a/tests/lib/memory.js +++ b/tests/lib/memory.js @@ -1,4 +1,4 @@ -var Filer = require('../..'); +var Filer = require('../../src'); function MemoryTestProvider(name) { var that = this; diff --git a/tests/lib/test-utils.js b/tests/lib/test-utils.js index ac33937..ffe0035 100644 --- a/tests/lib/test-utils.js +++ b/tests/lib/test-utils.js @@ -1,4 +1,4 @@ -var Filer = require('../..'); +var Filer = require('../../src'); var IndexedDBTestProvider = require('./indexeddb.js'); var WebSQLTestProvider = require('./websql.js'); var MemoryTestProvider = require('./memory.js'); diff --git a/tests/lib/websql.js b/tests/lib/websql.js index 5d2a189..7dc3486 100644 --- a/tests/lib/websql.js +++ b/tests/lib/websql.js @@ -1,4 +1,4 @@ -var Filer = require('../..'); +var Filer = require('../../src'); var needsCleanup = []; if(global.addEventListener) { diff --git a/tests/spec/errors.spec.js b/tests/spec/errors.spec.js index 4604812..8c6fcd6 100644 --- a/tests/spec/errors.spec.js +++ b/tests/spec/errors.spec.js @@ -1,4 +1,4 @@ -var Filer = require('../..'); +var Filer = require('../../src'); var expect = require('chai').expect; describe("Filer.Errors", function() { diff --git a/tests/spec/filer.filesystem.spec.js b/tests/spec/filer.filesystem.spec.js index b53979b..243e4dc 100644 --- a/tests/spec/filer.filesystem.spec.js +++ b/tests/spec/filer.filesystem.spec.js @@ -1,4 +1,4 @@ -var Filer = require('../..'); +var Filer = require('../../src'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/filer.spec.js b/tests/spec/filer.spec.js index 82deb33..b6fb385 100644 --- a/tests/spec/filer.spec.js +++ b/tests/spec/filer.spec.js @@ -1,4 +1,4 @@ -var Filer = require('../..'); +var Filer = require('../../src'); var expect = require('chai').expect; describe("Filer", function() { diff --git a/tests/spec/fs.appendFile.spec.js b/tests/spec/fs.appendFile.spec.js index 0224250..21401bd 100644 --- a/tests/spec/fs.appendFile.spec.js +++ b/tests/spec/fs.appendFile.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../..'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.chmod.spec.js b/tests/spec/fs.chmod.spec.js index 54d5484..fd66d3d 100644 --- a/tests/spec/fs.chmod.spec.js +++ b/tests/spec/fs.chmod.spec.js @@ -1,4 +1,4 @@ -var Filer = require('../..'); +var Filer = require('../../src'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.chown.spec.js b/tests/spec/fs.chown.spec.js index aa72312..4dbe896 100644 --- a/tests/spec/fs.chown.spec.js +++ b/tests/spec/fs.chown.spec.js @@ -1,4 +1,4 @@ -var Filer = require('../..'); +var Filer = require('../../src'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.close.spec.js b/tests/spec/fs.close.spec.js index 8f09771..aa273ed 100644 --- a/tests/spec/fs.close.spec.js +++ b/tests/spec/fs.close.spec.js @@ -1,4 +1,4 @@ -var Filer = require('../..'); +var Filer = require('../../src'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.exists.spec.js b/tests/spec/fs.exists.spec.js index f7c5ff6..f883501 100644 --- a/tests/spec/fs.exists.spec.js +++ b/tests/spec/fs.exists.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../..'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.link.spec.js b/tests/spec/fs.link.spec.js index 6c61082..83eb7a5 100644 --- a/tests/spec/fs.link.spec.js +++ b/tests/spec/fs.link.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../..'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.lseek.spec.js b/tests/spec/fs.lseek.spec.js index 266e22a..c095ddd 100644 --- a/tests/spec/fs.lseek.spec.js +++ b/tests/spec/fs.lseek.spec.js @@ -1,4 +1,4 @@ -var Filer = require('../..'); +var Filer = require('../../src'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.lstat.spec.js b/tests/spec/fs.lstat.spec.js index 44e3cde..788c230 100644 --- a/tests/spec/fs.lstat.spec.js +++ b/tests/spec/fs.lstat.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../..'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.mkdir.spec.js b/tests/spec/fs.mkdir.spec.js index bc4cebb..37a4652 100644 --- a/tests/spec/fs.mkdir.spec.js +++ b/tests/spec/fs.mkdir.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../..'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.mknod.spec.js b/tests/spec/fs.mknod.spec.js index 28b01df..68ddd4c 100644 --- a/tests/spec/fs.mknod.spec.js +++ b/tests/spec/fs.mknod.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../..'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.open.spec.js b/tests/spec/fs.open.spec.js index 203faa4..d6a102b 100644 --- a/tests/spec/fs.open.spec.js +++ b/tests/spec/fs.open.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../..'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; var constants = require('../../src/constants.js'); diff --git a/tests/spec/fs.read.spec.js b/tests/spec/fs.read.spec.js index 6606da0..054e03b 100644 --- a/tests/spec/fs.read.spec.js +++ b/tests/spec/fs.read.spec.js @@ -1,4 +1,4 @@ -var Filer = require('../..'); +var Filer = require('../../src'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.readdir.spec.js b/tests/spec/fs.readdir.spec.js index 1eba2c4..6c55de9 100644 --- a/tests/spec/fs.readdir.spec.js +++ b/tests/spec/fs.readdir.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../..'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.readlink.spec.js b/tests/spec/fs.readlink.spec.js index d96ed69..9929b9c 100644 --- a/tests/spec/fs.readlink.spec.js +++ b/tests/spec/fs.readlink.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../..'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.rename.spec.js b/tests/spec/fs.rename.spec.js index dcbd131..27453dc 100644 --- a/tests/spec/fs.rename.spec.js +++ b/tests/spec/fs.rename.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../..'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.rmdir.spec.js b/tests/spec/fs.rmdir.spec.js index 16f9c23..d8075db 100644 --- a/tests/spec/fs.rmdir.spec.js +++ b/tests/spec/fs.rmdir.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../..'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.shell.spec.js b/tests/spec/fs.shell.spec.js index d377dee..6ce7f44 100644 --- a/tests/spec/fs.shell.spec.js +++ b/tests/spec/fs.shell.spec.js @@ -1,4 +1,4 @@ -var Filer = require('../..'); +var Filer = require('../../src'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.spec.js b/tests/spec/fs.spec.js index 33f0df2..91abf21 100644 --- a/tests/spec/fs.spec.js +++ b/tests/spec/fs.spec.js @@ -1,4 +1,4 @@ -var Filer = require('../..'); +var Filer = require('../../src'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.stat.spec.js b/tests/spec/fs.stat.spec.js index c3a014e..f14bdee 100644 --- a/tests/spec/fs.stat.spec.js +++ b/tests/spec/fs.stat.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../..'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; @@ -27,7 +26,7 @@ describe('fs.stat', function() { fs.stat('/', function(error, result) { expect(error).not.to.exist; - expect(result).to.exit; + expect(result).to.exist; expect(result['node']).to.be.a('string'); expect(result['dev']).to.equal(fs.name); diff --git a/tests/spec/fs.stats.spec.js b/tests/spec/fs.stats.spec.js index b2fc77c..c92ecd1 100644 --- a/tests/spec/fs.stats.spec.js +++ b/tests/spec/fs.stats.spec.js @@ -1,5 +1,4 @@ -var Filer = require('../..'); -var Path = Filer.Path; +var Path = require('../../src').Path; var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.symlink.spec.js b/tests/spec/fs.symlink.spec.js index 351a665..7b36d81 100644 --- a/tests/spec/fs.symlink.spec.js +++ b/tests/spec/fs.symlink.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../..'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.truncate.spec.js b/tests/spec/fs.truncate.spec.js index 0c8eaba..8c8cfdc 100644 --- a/tests/spec/fs.truncate.spec.js +++ b/tests/spec/fs.truncate.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../..'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.unlink.spec.js b/tests/spec/fs.unlink.spec.js index de9ca63..a6d71aa 100644 --- a/tests/spec/fs.unlink.spec.js +++ b/tests/spec/fs.unlink.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../..'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.utimes.spec.js b/tests/spec/fs.utimes.spec.js index 8029734..671a4be 100644 --- a/tests/spec/fs.utimes.spec.js +++ b/tests/spec/fs.utimes.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../..'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.watch.spec.js b/tests/spec/fs.watch.spec.js index 67af4d2..f7dda0c 100644 --- a/tests/spec/fs.watch.spec.js +++ b/tests/spec/fs.watch.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../..'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.write.spec.js b/tests/spec/fs.write.spec.js index afc67af..29e6aee 100644 --- a/tests/spec/fs.write.spec.js +++ b/tests/spec/fs.write.spec.js @@ -1,4 +1,4 @@ -var Filer = require('../..'); +var Filer = require('../../src'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.writeFile-readFile.spec.js b/tests/spec/fs.writeFile-readFile.spec.js index 048b72b..37c4a87 100644 --- a/tests/spec/fs.writeFile-readFile.spec.js +++ b/tests/spec/fs.writeFile-readFile.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../..'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/fs.xattr.spec.js b/tests/spec/fs.xattr.spec.js index f53724b..092939e 100644 --- a/tests/spec/fs.xattr.spec.js +++ b/tests/spec/fs.xattr.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../..'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/node-js/simple/nodejs.spec.js b/tests/spec/node-js/simple/nodejs.spec.js deleted file mode 100644 index 3fde918..0000000 --- a/tests/spec/node-js/simple/nodejs.spec.js +++ /dev/null @@ -1,13 +0,0 @@ -define(["Filer", "util"], function(Filer, util) { - - describe('Nodejs compatability', function() { - beforeEach(util.setup); - afterEach(util.cleanup); - - it('module should be requireable', function() { - expect(function() { - var Filer = require('../../dist/filer_node.js'); - }).to.not.throwError; - }); - }); -}); diff --git a/tests/spec/node-js/simple/test-fs-mkdir.js b/tests/spec/node-js/simple/test-fs-mkdir.js index b851b05..389d1d2 100644 --- a/tests/spec/node-js/simple/test-fs-mkdir.js +++ b/tests/spec/node-js/simple/test-fs-mkdir.js @@ -1,4 +1,3 @@ -var Filer = require('../../../..'); var util = require('../../../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/node-js/simple/test-fs-null-bytes.js b/tests/spec/node-js/simple/test-fs-null-bytes.js index 6ab1b44..8c51eef 100644 --- a/tests/spec/node-js/simple/test-fs-null-bytes.js +++ b/tests/spec/node-js/simple/test-fs-null-bytes.js @@ -1,4 +1,3 @@ -var Filer = require('../../../..'); var util = require('../../../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/node-js/simple/test-fs-watch-recursive.js b/tests/spec/node-js/simple/test-fs-watch-recursive.js index 773537f..d6b6cfc 100644 --- a/tests/spec/node-js/simple/test-fs-watch-recursive.js +++ b/tests/spec/node-js/simple/test-fs-watch-recursive.js @@ -1,4 +1,3 @@ -var Filer = require('../../../..'); var util = require('../../../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/node-js/simple/test-fs-watch.js b/tests/spec/node-js/simple/test-fs-watch.js index e60ee2d..bb05419 100644 --- a/tests/spec/node-js/simple/test-fs-watch.js +++ b/tests/spec/node-js/simple/test-fs-watch.js @@ -1,4 +1,3 @@ -var Filer = require('../../../..'); var util = require('../../../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/path-resolution.spec.js b/tests/spec/path-resolution.spec.js index b2efc3f..3ae54a4 100644 --- a/tests/spec/path-resolution.spec.js +++ b/tests/spec/path-resolution.spec.js @@ -1,4 +1,4 @@ -var Filer = require('../..'); +var Filer = require('../../src'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/providers/providers.base.js b/tests/spec/providers/providers.base.js index 09aef4f..70e1510 100644 --- a/tests/spec/providers/providers.base.js +++ b/tests/spec/providers/providers.base.js @@ -1,4 +1,4 @@ -var Buffer = require('../../..').Buffer; +var Buffer = require('../../../src').Buffer; var util = require('../../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/providers/providers.spec.js b/tests/spec/providers/providers.spec.js index 5f34202..d452f26 100644 --- a/tests/spec/providers/providers.spec.js +++ b/tests/spec/providers/providers.spec.js @@ -1,4 +1,4 @@ -var Filer = require('../../..'); +var Filer = require('../../../src'); var expect = require('chai').expect; describe("Filer.FileSystem.providers", function() { diff --git a/tests/spec/shell/cat.spec.js b/tests/spec/shell/cat.spec.js index e7b6d67..4396c6f 100644 --- a/tests/spec/shell/cat.spec.js +++ b/tests/spec/shell/cat.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../../..'); var util = require('../../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/shell/cd.spec.js b/tests/spec/shell/cd.spec.js index c45fbf8..ea2e213 100644 --- a/tests/spec/shell/cd.spec.js +++ b/tests/spec/shell/cd.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../../..'); var util = require('../../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/shell/env.spec.js b/tests/spec/shell/env.spec.js index 5cf1c9e..c4e16fa 100644 --- a/tests/spec/shell/env.spec.js +++ b/tests/spec/shell/env.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../../..'); var util = require('../../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/shell/exec.spec.js b/tests/spec/shell/exec.spec.js index ee94a42..1044c9b 100644 --- a/tests/spec/shell/exec.spec.js +++ b/tests/spec/shell/exec.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../../..'); var util = require('../../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/shell/find.spec.js b/tests/spec/shell/find.spec.js index 3d6a3ea..88c8a1d 100644 --- a/tests/spec/shell/find.spec.js +++ b/tests/spec/shell/find.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../../..'); var util = require('../../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/shell/ls.spec.js b/tests/spec/shell/ls.spec.js index f1e6e84..b453764 100644 --- a/tests/spec/shell/ls.spec.js +++ b/tests/spec/shell/ls.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../../..'); var util = require('../../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/shell/mkdirp.spec.js b/tests/spec/shell/mkdirp.spec.js index bbe6a04..5f88544 100644 --- a/tests/spec/shell/mkdirp.spec.js +++ b/tests/spec/shell/mkdirp.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../../..'); var util = require('../../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/shell/rm.spec.js b/tests/spec/shell/rm.spec.js index 0777460..1e7d635 100644 --- a/tests/spec/shell/rm.spec.js +++ b/tests/spec/shell/rm.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../../..'); var util = require('../../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/shell/touch.spec.js b/tests/spec/shell/touch.spec.js index e37bd6a..665a8bf 100644 --- a/tests/spec/shell/touch.spec.js +++ b/tests/spec/shell/touch.spec.js @@ -1,4 +1,3 @@ -var Filer = require('../../..'); var util = require('../../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/time-flags.spec.js b/tests/spec/time-flags.spec.js index e4ec243..e5d856a 100644 --- a/tests/spec/time-flags.spec.js +++ b/tests/spec/time-flags.spec.js @@ -1,4 +1,4 @@ -var Filer = require('../..'); +var Filer = require('../../src'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/times.spec.js b/tests/spec/times.spec.js index b6ff1c5..df6178f 100644 --- a/tests/spec/times.spec.js +++ b/tests/spec/times.spec.js @@ -1,4 +1,4 @@ -var Filer = require('../..'); +var Filer = require('../../src'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; diff --git a/tests/spec/trailing-slashes.spec.js b/tests/spec/trailing-slashes.spec.js index c6d1708..76539c4 100644 --- a/tests/spec/trailing-slashes.spec.js +++ b/tests/spec/trailing-slashes.spec.js @@ -1,4 +1,4 @@ -var Path = require('../..').Path; +var Path = require('../../src').Path; var expect = require('chai').expect; describe('Path.normalize and trailing slashes', function() {