diff --git a/README.md b/README.md index 3a8da63..34d898e 100644 --- a/README.md +++ b/README.md @@ -94,4 +94,4 @@ $ gulp watch # watch for source file changes `gulp watch` will watch for changes in the `/src/` directory and lint, concatenate, and minify the source files when a change occurs. The output files - `reactfire.js` and `reactfire.min.js` - are written to the `/dist/` directory. -You can run the test suite by navigating to `file:///path/to/tests/TestRunner.html` or run the tests via the command line using `gulp test`. \ No newline at end of file +You can run the test suite by navigating to `file:///path/to/reactfire/tests/TestRunner.html` or via the command line using `gulp test`. \ No newline at end of file diff --git a/tests/specs/common.spec.js b/tests/specs/common.spec.js index 79263ab..e335c9c 100644 --- a/tests/specs/common.spec.js +++ b/tests/specs/common.spec.js @@ -39,7 +39,15 @@ function afterEachHelper(done) { /* Returns a random alphabetic string of variable length */ function generateRandomString() { - return (Math.random() + 1).toString(36).substring(7); + var possibleCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + var numPossibleCharacters = possibleCharacters.length; + + var text = ""; + for (var i = 0; i < 10; i++) { + text += possibleCharacters.charAt(Math.floor(Math.random() * numPossibleCharacters)); + } + + return text; } /* Returns the current data in the Firebase */