Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

Commit

Permalink
remove chai-things
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaurav0 committed Oct 17, 2018
1 parent 1810da2 commit 293abba
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 69 deletions.
125 changes: 62 additions & 63 deletions node-tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ var fs = require('fs-extra');
var exec = require('child_process').exec;

var chai = require('chai');
chai.use(require('chai-things'));
var expect = chai.expect;

var FAILING_FILE = __dirname + '/../tests/dummy/app/unused.js';
Expand All @@ -23,17 +22,17 @@ describe('ember-cli-eslint', function() {

return emberTest().then(function(result) {
expect(result.error).to.not.exist;
expect(result.stdout.match(/[^\r\n]+/g))
.to.include.something.that.matches(/ok 1 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app.js: should pass ESLint/)
.to.include.something.that.matches(/ok 2 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| controllers\/thing.js: should pass ESLint/)
.to.include.something.that.matches(/ok 3 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| helpers\/destroy-app.js: should pass ESLint/)
.to.include.something.that.matches(/ok 4 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| helpers\/module-for-acceptance.js: should pass ESLint/)
.to.include.something.that.matches(/ok 5 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| helpers\/start-app.js: should pass ESLint/)
.to.include.something.that.matches(/ok 6 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| models\/thing.js: should pass ESLint/)
.to.include.something.that.matches(/ok 7 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| resolver.js: should pass ESLint/)
.to.include.something.that.matches(/ok 8 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| router.js: should pass ESLint/)
.to.include.something.that.matches(/ok 9 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| test-helper.js: should pass ESLint/)
.to.not.include.something.that.matches(/not ok 10 Chrome [0-9]+\.[0-9]+ \[[0-9]+ ms\] - ESLint \| unused.js: should pass ESLint/);
expect(result.stdout)
.to.match(/ok 1 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app\.js: should pass ESLint\r?\n/)
.to.match(/ok 2 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| controllers\/thing\.js: should pass ESLint\r?\n/)
.to.match(/ok 3 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| helpers\/destroy-app\.js: should pass ESLint\r?\n/)
.to.match(/ok 4 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| helpers\/module-for-acceptance\.js: should pass ESLint\r?\n/)
.to.match(/ok 5 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| helpers\/start-app\.js: should pass ESLint\r?\n/)
.to.match(/ok 6 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| models\/thing\.js: should pass ESLint\r?\n/)
.to.match(/ok 7 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| resolver\.js: should pass ESLint\r?\n/)
.to.match(/ok 8 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| router\.js: should pass ESLint\r?\n/)
.to.match(/ok 9 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| test-helper\.js: should pass ESLint\r?\n/)
.to.not.match(/not ok 10 Chrome [0-9]+\.[0-9]+ \[[0-9]+ ms\] - ESLint \| unused\.js: should pass ESLint\r?\n/);
})
});

Expand All @@ -44,17 +43,17 @@ describe('ember-cli-eslint', function() {

return emberTest({ NO_GROUPING: true }).then(function(result) {
expect(result.error).to.exist;
expect(result.stdout.match(/[^\r\n]+/g))
.to.include.something.that.matches(/ok 1 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app.js: should pass ESLint/)
.to.include.something.that.matches(/ok 2 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| controllers\/thing.js: should pass ESLint/)
.to.include.something.that.matches(/ok 3 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| helpers\/destroy-app.js: should pass ESLint/)
.to.include.something.that.matches(/ok 4 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| helpers\/module-for-acceptance.js: should pass ESLint/)
.to.include.something.that.matches(/ok 5 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| helpers\/start-app.js: should pass ESLint/)
.to.include.something.that.matches(/ok 6 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| models\/thing.js: should pass ESLint/)
.to.include.something.that.matches(/ok 7 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| resolver.js: should pass ESLint/)
.to.include.something.that.matches(/ok 8 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| router.js: should pass ESLint/)
.to.include.something.that.matches(/ok 9 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| test-helper.js: should pass ESLint/)
.to.include.something.that.matches(/not ok 10 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| unused.js: should pass ESLint/);
expect(result.stdout)
.to.match(/ok 1 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app\.js: should pass ESLint\r?\n/)
.to.match(/ok 2 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| controllers\/thing\.js: should pass ESLint\r?\n/)
.to.match(/ok 3 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| helpers\/destroy-app\.js: should pass ESLint\r?\n/)
.to.match(/ok 4 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| helpers\/module-for-acceptance\.js: should pass ESLint\r?\n/)
.to.match(/ok 5 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| helpers\/start-app\.js: should pass ESLint\r?\n/)
.to.match(/ok 6 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| models\/thing\.js: should pass ESLint\r?\n/)
.to.match(/ok 7 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| resolver\.js: should pass ESLint\r?\n/)
.to.match(/ok 8 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| router\.js: should pass ESLint\r?\n/)
.to.match(/ok 9 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| test-helper\.js: should pass ESLint\r?\n/)
.to.match(/not ok 10 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| unused\.js: should pass ESLint\r?\n/);
})
});

Expand All @@ -63,19 +62,19 @@ describe('ember-cli-eslint', function() {

return emberTest().then(function(result) {
expect(result.error).to.not.exist;
expect(result.stdout.match(/[^\r\n]+/g))
.to.include.something.that.matches(/ok 1 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: app.js/)
.to.include.something.that.matches(/ok 2 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: controllers\/thing.js/)
.to.include.something.that.matches(/ok 3 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: models\/thing.js/)
.to.include.something.that.matches(/ok 4 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: resolver.js/)
.to.include.something.that.matches(/ok 5 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: router.js/)
.to.not.include.something.that.matches(/not ok 6 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: unused.js/);

expect(result.stdout.match(/[^\r\n]+/g))
.to.include.something.that.matches(/ok 6 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/destroy-app.js/)
.to.include.something.that.matches(/ok 7 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/module-for-acceptance.js/)
.to.include.something.that.matches(/ok 8 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/start-app.js/)
.to.include.something.that.matches(/ok 9 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: test-helper.js/);
expect(result.stdout)
.to.match(/ok 1 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: app\.js\r?\n/)
.to.match(/ok 2 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: controllers\/thing\.js\r?\n/)
.to.match(/ok 3 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: models\/thing\.js\r?\n/)
.to.match(/ok 4 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: resolver\.js\r?\n/)
.to.match(/ok 5 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: router\.js\r?\n/)
.to.not.match(/not ok 6 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: unused\.js\r?\n/);

expect(result.stdout)
.to.match(/ok 6 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/destroy-app\.js\r?\n/)
.to.match(/ok 7 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/module-for-acceptance\.js\r?\n/)
.to.match(/ok 8 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/start-app\.js\r?\n/)
.to.match(/ok 9 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: test-helper\.js\r?\n/);
})
});

Expand All @@ -86,19 +85,19 @@ describe('ember-cli-eslint', function() {

return emberTest().then(function(result) {
expect(result.error).to.exist;
expect(result.stdout.match(/[^\r\n]+/g))
.to.include.something.that.matches(/ok 1 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: app.js/)
.to.include.something.that.matches(/ok 2 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: controllers\/thing.js/)
.to.include.something.that.matches(/ok 3 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: models\/thing.js/)
.to.include.something.that.matches(/ok 4 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: resolver.js/)
.to.include.something.that.matches(/ok 5 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: router.js/)
.to.include.something.that.matches(/not ok 6 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: unused.js/);

expect(result.stdout.match(/[^\r\n]+/g))
.to.include.something.that.matches(/ok 7 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/destroy-app.js/)
.to.include.something.that.matches(/ok 8 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/module-for-acceptance.js/)
.to.include.something.that.matches(/ok 9 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/start-app.js/)
.to.include.something.that.matches(/ok 10 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: test-helper.js/);
expect(result.stdout)
.to.match(/ok 1 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: app\.js\r?\n/)
.to.match(/ok 2 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: controllers\/thing\.js\r?\n/)
.to.match(/ok 3 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: models\/thing\.js\r?\n/)
.to.match(/ok 4 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: resolver\.js\r?\n/)
.to.match(/ok 5 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: router\.js\r?\n/)
.to.match(/not ok 6 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: unused\.js\r?\n/);

expect(result.stdout)
.to.match(/ok 7 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/destroy-app\.js\r?\n/)
.to.match(/ok 8 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/module-for-acceptance\.js\r?\n/)
.to.match(/ok 9 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/start-app\.js\r?\n/)
.to.match(/ok 10 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: test-helper\.js\r?\n/);
})
});

Expand All @@ -107,20 +106,20 @@ describe('ember-cli-eslint', function() {

return emberTest().then(function(result) {
expect(result.error).to.not.exist;
expect(result.stdout.match(/[^\r\n]+/g))
.to.include.something.that.matches(/ok 1 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: app.js/)
.to.include.something.that.matches(/ok 2 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: controllers\/thing.js/)
.to.include.something.that.matches(/ok 3 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: models\/thing.js/)
.to.include.something.that.matches(/ok 4 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: resolver.js/)
.to.include.something.that.matches(/ok 5 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: router.js/)
.to.include.something.that.matches(/ok 6 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: routes\/thing.jsx/)
.to.not.include.something.that.matches(/not ok 7 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: unused.js/);

expect(result.stdout.match(/[^\r\n]+/g))
.to.include.something.that.matches(/ok 7 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/destroy-app.js/)
.to.include.something.that.matches(/ok 8 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/module-for-acceptance.js/)
.to.include.something.that.matches(/ok 9 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/start-app.js/)
.to.include.something.that.matches(/ok 10 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: test-helper.js/);
expect(result.stdout)
.to.match(/ok 1 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: app\.js\r?\n/)
.to.match(/ok 2 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: controllers\/thing\.js\r?\n/)
.to.match(/ok 3 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: models\/thing\.js\r?\n/)
.to.match(/ok 4 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: resolver\.js\r?\n/)
.to.match(/ok 5 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: router\.js\r?\n/)
.to.match(/ok 6 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: routes\/thing\.jsx\r?\n/)
.to.not.match(/not ok 7 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: unused\.js\r?\n/);

expect(result.stdout)
.to.match(/ok 7 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/destroy-app\.js\r?\n/)
.to.match(/ok 8 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/module-for-acceptance\.js\r?\n/)
.to.match(/ok 9 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/start-app\.js\r?\n/)
.to.match(/ok 10 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: test-helper\.js\r?\n/);
})
});
});
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"devDependencies": {
"broccoli-asset-rev": "^3.0.0",
"chai": "^4.0.2",
"chai-things": "^0.2.0",
"ember-cli": "~3.4.3",
"ember-cli-babel": "^7.1.2",
"ember-cli-blueprint-test-helpers": "^0.19.1",
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2548,11 +2548,6 @@ chai-files@^1.0.0, chai-files@^1.1.0:
dependencies:
assertion-error "^1.0.1"

chai-things@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/chai-things/-/chai-things-0.2.0.tgz#c55128378f9bb399e994f00052151984ed6ebe70"
integrity sha1-xVEoN4+bs5nplPAAUhUZhO1uvnA=

chai@^3.3.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247"
Expand Down

0 comments on commit 293abba

Please sign in to comment.