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

Commit 293abba

Browse files
committed
remove chai-things
1 parent 1810da2 commit 293abba

File tree

3 files changed

+62
-69
lines changed

3 files changed

+62
-69
lines changed

node-tests/test.js

+62-63
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ var fs = require('fs-extra');
44
var exec = require('child_process').exec;
55

66
var chai = require('chai');
7-
chai.use(require('chai-things'));
87
var expect = chai.expect;
98

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

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

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

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

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

6463
return emberTest().then(function(result) {
6564
expect(result.error).to.not.exist;
66-
expect(result.stdout.match(/[^\r\n]+/g))
67-
.to.include.something.that.matches(/ok 1 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: app.js/)
68-
.to.include.something.that.matches(/ok 2 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: controllers\/thing.js/)
69-
.to.include.something.that.matches(/ok 3 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: models\/thing.js/)
70-
.to.include.something.that.matches(/ok 4 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: resolver.js/)
71-
.to.include.something.that.matches(/ok 5 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: router.js/)
72-
.to.not.include.something.that.matches(/not ok 6 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: unused.js/);
73-
74-
expect(result.stdout.match(/[^\r\n]+/g))
75-
.to.include.something.that.matches(/ok 6 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/destroy-app.js/)
76-
.to.include.something.that.matches(/ok 7 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/module-for-acceptance.js/)
77-
.to.include.something.that.matches(/ok 8 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/start-app.js/)
78-
.to.include.something.that.matches(/ok 9 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: test-helper.js/);
65+
expect(result.stdout)
66+
.to.match(/ok 1 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: app\.js\r?\n/)
67+
.to.match(/ok 2 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: controllers\/thing\.js\r?\n/)
68+
.to.match(/ok 3 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: models\/thing\.js\r?\n/)
69+
.to.match(/ok 4 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: resolver\.js\r?\n/)
70+
.to.match(/ok 5 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: router\.js\r?\n/)
71+
.to.not.match(/not ok 6 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: unused\.js\r?\n/);
72+
73+
expect(result.stdout)
74+
.to.match(/ok 6 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/destroy-app\.js\r?\n/)
75+
.to.match(/ok 7 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/module-for-acceptance\.js\r?\n/)
76+
.to.match(/ok 8 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/start-app\.js\r?\n/)
77+
.to.match(/ok 9 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: test-helper\.js\r?\n/);
7978
})
8079
});
8180

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

8786
return emberTest().then(function(result) {
8887
expect(result.error).to.exist;
89-
expect(result.stdout.match(/[^\r\n]+/g))
90-
.to.include.something.that.matches(/ok 1 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: app.js/)
91-
.to.include.something.that.matches(/ok 2 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: controllers\/thing.js/)
92-
.to.include.something.that.matches(/ok 3 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: models\/thing.js/)
93-
.to.include.something.that.matches(/ok 4 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: resolver.js/)
94-
.to.include.something.that.matches(/ok 5 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: router.js/)
95-
.to.include.something.that.matches(/not ok 6 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: unused.js/);
96-
97-
expect(result.stdout.match(/[^\r\n]+/g))
98-
.to.include.something.that.matches(/ok 7 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/destroy-app.js/)
99-
.to.include.something.that.matches(/ok 8 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/module-for-acceptance.js/)
100-
.to.include.something.that.matches(/ok 9 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/start-app.js/)
101-
.to.include.something.that.matches(/ok 10 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: test-helper.js/);
88+
expect(result.stdout)
89+
.to.match(/ok 1 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: app\.js\r?\n/)
90+
.to.match(/ok 2 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: controllers\/thing\.js\r?\n/)
91+
.to.match(/ok 3 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: models\/thing\.js\r?\n/)
92+
.to.match(/ok 4 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: resolver\.js\r?\n/)
93+
.to.match(/ok 5 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: router\.js\r?\n/)
94+
.to.match(/not ok 6 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: unused\.js\r?\n/);
95+
96+
expect(result.stdout)
97+
.to.match(/ok 7 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/destroy-app\.js\r?\n/)
98+
.to.match(/ok 8 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/module-for-acceptance\.js\r?\n/)
99+
.to.match(/ok 9 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/start-app\.js\r?\n/)
100+
.to.match(/ok 10 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: test-helper\.js\r?\n/);
102101
})
103102
});
104103

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

108107
return emberTest().then(function(result) {
109108
expect(result.error).to.not.exist;
110-
expect(result.stdout.match(/[^\r\n]+/g))
111-
.to.include.something.that.matches(/ok 1 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: app.js/)
112-
.to.include.something.that.matches(/ok 2 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: controllers\/thing.js/)
113-
.to.include.something.that.matches(/ok 3 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: models\/thing.js/)
114-
.to.include.something.that.matches(/ok 4 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: resolver.js/)
115-
.to.include.something.that.matches(/ok 5 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: router.js/)
116-
.to.include.something.that.matches(/ok 6 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: routes\/thing.jsx/)
117-
.to.not.include.something.that.matches(/not ok 7 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: unused.js/);
118-
119-
expect(result.stdout.match(/[^\r\n]+/g))
120-
.to.include.something.that.matches(/ok 7 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/destroy-app.js/)
121-
.to.include.something.that.matches(/ok 8 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/module-for-acceptance.js/)
122-
.to.include.something.that.matches(/ok 9 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/start-app.js/)
123-
.to.include.something.that.matches(/ok 10 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: test-helper.js/);
109+
expect(result.stdout)
110+
.to.match(/ok 1 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: app\.js\r?\n/)
111+
.to.match(/ok 2 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: controllers\/thing\.js\r?\n/)
112+
.to.match(/ok 3 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: models\/thing\.js\r?\n/)
113+
.to.match(/ok 4 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: resolver\.js\r?\n/)
114+
.to.match(/ok 5 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: router\.js\r?\n/)
115+
.to.match(/ok 6 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: routes\/thing\.jsx\r?\n/)
116+
.to.not.match(/not ok 7 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| app: unused\.js\r?\n/);
117+
118+
expect(result.stdout)
119+
.to.match(/ok 7 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/destroy-app\.js\r?\n/)
120+
.to.match(/ok 8 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/module-for-acceptance\.js\r?\n/)
121+
.to.match(/ok 9 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: helpers\/start-app\.js\r?\n/)
122+
.to.match(/ok 10 Chrome [0-9]+\.[0-9]+ - \[[0-9]+ ms\] - ESLint \| tests: test-helper\.js\r?\n/);
124123
})
125124
});
126125
});

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
"devDependencies": {
4646
"broccoli-asset-rev": "^3.0.0",
4747
"chai": "^4.0.2",
48-
"chai-things": "^0.2.0",
4948
"ember-cli": "~3.4.3",
5049
"ember-cli-babel": "^7.1.2",
5150
"ember-cli-blueprint-test-helpers": "^0.19.1",

yarn.lock

-5
Original file line numberDiff line numberDiff line change
@@ -2548,11 +2548,6 @@ chai-files@^1.0.0, chai-files@^1.1.0:
25482548
dependencies:
25492549
assertion-error "^1.0.1"
25502550

2551-
chai-things@^0.2.0:
2552-
version "0.2.0"
2553-
resolved "https://registry.yarnpkg.com/chai-things/-/chai-things-0.2.0.tgz#c55128378f9bb399e994f00052151984ed6ebe70"
2554-
integrity sha1-xVEoN4+bs5nplPAAUhUZhO1uvnA=
2555-
25562551
chai@^3.3.0:
25572552
version "3.5.0"
25582553
resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247"

0 commit comments

Comments
 (0)