Skip to content

Commit

Permalink
Updated test.
Browse files Browse the repository at this point in the history
  • Loading branch information
qhanam committed Sep 21, 2015
1 parent 2b67618 commit 3485048
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -40,4 +40,5 @@ Thumbs.db

# IDE generated files #
######################
.idea
.idea
*.swp
Binary file removed test/.simple-cb-converted.js.swp
Binary file not shown.
Binary file removed test/.simple-cb.js.swp
Binary file not shown.
28 changes: 21 additions & 7 deletions test/test.js
@@ -1,9 +1,23 @@
var assert = require("assert");
describe('Array', function() {
describe('#indexOf()', function () {
it('should return -1 when the value is not present', function () {
assert.equal(-1, [1,2,3].indexOf(5));
assert.equal(-1, [1,2,3].indexOf(0));
});
});
var fs = require("fs");
//var pd = require("../pattern-detect");

/* Test basic refactorings with no third party libraries and no chaining. */
describe('Basic', function() {

/* A contrived example. */
describe('simple.js', function() {
it('the refactored code does not match the expected', function() {

/* Get the file names. */
var original = "./input/simple.js";
var expected = "./input/simple-refactores.js";

/* Run the refactoring on the file. */

/* Check the refactoring is correct. */
assert.equal(fs.existsSync(original), true);

});
});
});

0 comments on commit 3485048

Please sign in to comment.