Skip to content

Commit 95cccec

Browse files
authored
Chores: Remove "chai" (#1263)
1 parent 878879a commit 95cccec

File tree

6 files changed

+16
-26
lines changed

6 files changed

+16
-26
lines changed

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"start": "npm run test:base -- --watch --growl",
88
"test:base": "mocha \"tests/lib/**/*.js\" --reporter dot",
99
"test": "nyc npm run test:base -- \"tests/integrations/*.js\" --timeout 60000",
10-
"debug": "mocha --inspect-brk \"tests/lib/**/*.js\" --reporter dot --timeout 60000",
10+
"debug": "mocha --inspect \"tests/lib/**/*.js\" --reporter dot --timeout 60000",
1111
"cover": "npm run cover:test && npm run cover:report",
1212
"cover:test": "nyc npm run test:base -- --timeout 60000",
1313
"cover:report": "nyc report --reporter=html",
@@ -66,7 +66,6 @@
6666
"@typescript-eslint/parser": "^3.0.2",
6767
"@vuepress/plugin-pwa": "^1.4.1",
6868
"babel-eslint": "^10.1.0",
69-
"chai": "^4.2.0",
7069
"eslint": "^7.0.0",
7170
"eslint-config-prettier": "^6.11.0",
7271
"eslint-plugin-eslint-plugin": "^2.2.1",

tests/lib/autofix.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@
66

77
const Linter = require('eslint').Linter
88
const parser = require('vue-eslint-parser')
9-
const chai = require('chai')
9+
const assert = require('assert')
1010

1111
const rules = require('../..').rules
1212

13-
const assert = chai.assert
14-
1513
const baseConfig = {
1614
parser: 'vue-eslint-parser',
1715
parserOptions: {

tests/lib/utils/casing.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
'use strict'
22

33
const casing = require('../../../lib/utils/casing')
4-
const chai = require('chai')
5-
6-
const assert = chai.assert
4+
const assert = require('assert')
75

86
describe('getConverter()', () => {
97
it('should convert string to camelCase', () => {

tests/lib/utils/html-comments.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22

33
const fs = require('fs')
44
const path = require('path')
5-
const chai = require('chai')
5+
const assert = require('assert')
66

77
const Linter = require('eslint').Linter
8-
const assert = chai.assert
98

109
const htmlComments = require('../../../lib/utils/html-comments')
1110

tests/lib/utils/index.js

+11-13
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
const babelEslint = require('babel-eslint')
44
const espree = require('espree')
55
const utils = require('../../../lib/utils/index')
6-
const chai = require('chai')
7-
8-
const assert = chai.assert
6+
const assert = require('assert')
97

108
describe('getComputedProperties', () => {
119
const parse = function (code) {
@@ -59,11 +57,11 @@ describe('getComputedProperties', () => {
5957
'it detects all computed properties'
6058
)
6159

62-
assert.notOk(computedProperties[0].value)
60+
assert.ok(!computedProperties[0].value)
6361
assert.ok(computedProperties[1].value)
6462
assert.ok(computedProperties[2].value)
65-
assert.notOk(computedProperties[3].value)
66-
assert.notOk(computedProperties[4].value)
63+
assert.ok(!computedProperties[3].value)
64+
assert.ok(!computedProperties[4].value)
6765
assert.ok(computedProperties[5].value)
6866
})
6967

@@ -108,7 +106,7 @@ describe('getComputedProperties', () => {
108106
'it detects all computed properties'
109107
)
110108

111-
assert.notOk(computedProperties[0].value)
109+
assert.ok(!computedProperties[0].value)
112110
})
113111
})
114112

@@ -418,19 +416,19 @@ describe('getComponentProps', () => {
418416

419417
assert.ok(props[0].node.type === 'Literal')
420418
assert.deepEqual(props[0].key, props[0].node)
421-
assert.notOk(props[0].value)
419+
assert.ok(!props[0].value)
422420

423421
assert.ok(props[1].node.type === 'Identifier')
424-
assert.notOk(props[1].key)
425-
assert.notOk(props[1].value)
422+
assert.ok(!props[1].key)
423+
assert.ok(!props[1].value)
426424

427425
assert.ok(props[2].node.type === 'TemplateLiteral')
428426
assert.deepEqual(props[2].key, props[2].node)
429-
assert.notOk(props[2].value)
427+
assert.ok(!props[2].value)
430428

431429
assert.ok(props[3].node.type === 'Literal')
432-
assert.notOk(props[3].key)
433-
assert.notOk(props[3].value)
430+
assert.ok(!props[3].key)
431+
assert.ok(!props[3].value)
434432
})
435433
})
436434

tests/lib/utils/regexp.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
'use strict'
22

33
const { escape, toRegExp } = require('../../../lib/utils/regexp')
4-
const chai = require('chai')
5-
6-
const assert = chai.assert
4+
const assert = require('assert')
75

86
const ESCAPED = '\\^\\$\\.\\*\\+\\?\\(\\)\\[\\]\\{\\}\\|\\\\'
97
const UNESCAPED = '^$.*+?()[]{}|\\'

0 commit comments

Comments
 (0)