Skip to content

Chores: Remove "chai" #1263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "npm run test:base -- --watch --growl",
"test:base": "mocha \"tests/lib/**/*.js\" --reporter dot",
"test": "nyc npm run test:base -- \"tests/integrations/*.js\" --timeout 60000",
"debug": "mocha --inspect-brk \"tests/lib/**/*.js\" --reporter dot --timeout 60000",
"debug": "mocha --inspect \"tests/lib/**/*.js\" --reporter dot --timeout 60000",
"cover": "npm run cover:test && npm run cover:report",
"cover:test": "nyc npm run test:base -- --timeout 60000",
"cover:report": "nyc report --reporter=html",
Expand Down Expand Up @@ -66,7 +66,6 @@
"@typescript-eslint/parser": "^3.0.2",
"@vuepress/plugin-pwa": "^1.4.1",
"babel-eslint": "^10.1.0",
"chai": "^4.2.0",
"eslint": "^7.0.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-eslint-plugin": "^2.2.1",
Expand Down
4 changes: 1 addition & 3 deletions tests/lib/autofix.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@

const Linter = require('eslint').Linter
const parser = require('vue-eslint-parser')
const chai = require('chai')
const assert = require('assert')

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

const assert = chai.assert

const baseConfig = {
parser: 'vue-eslint-parser',
parserOptions: {
Expand Down
4 changes: 1 addition & 3 deletions tests/lib/utils/casing.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
'use strict'

const casing = require('../../../lib/utils/casing')
const chai = require('chai')

const assert = chai.assert
const assert = require('assert')

describe('getConverter()', () => {
it('should convert string to camelCase', () => {
Expand Down
3 changes: 1 addition & 2 deletions tests/lib/utils/html-comments.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

const fs = require('fs')
const path = require('path')
const chai = require('chai')
const assert = require('assert')

const Linter = require('eslint').Linter
const assert = chai.assert

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

Expand Down
24 changes: 11 additions & 13 deletions tests/lib/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
const babelEslint = require('babel-eslint')
const espree = require('espree')
const utils = require('../../../lib/utils/index')
const chai = require('chai')

const assert = chai.assert
const assert = require('assert')

describe('getComputedProperties', () => {
const parse = function (code) {
Expand Down Expand Up @@ -59,11 +57,11 @@ describe('getComputedProperties', () => {
'it detects all computed properties'
)

assert.notOk(computedProperties[0].value)
assert.ok(!computedProperties[0].value)
assert.ok(computedProperties[1].value)
assert.ok(computedProperties[2].value)
assert.notOk(computedProperties[3].value)
assert.notOk(computedProperties[4].value)
assert.ok(!computedProperties[3].value)
assert.ok(!computedProperties[4].value)
assert.ok(computedProperties[5].value)
})

Expand Down Expand Up @@ -108,7 +106,7 @@ describe('getComputedProperties', () => {
'it detects all computed properties'
)

assert.notOk(computedProperties[0].value)
assert.ok(!computedProperties[0].value)
})
})

Expand Down Expand Up @@ -418,19 +416,19 @@ describe('getComponentProps', () => {

assert.ok(props[0].node.type === 'Literal')
assert.deepEqual(props[0].key, props[0].node)
assert.notOk(props[0].value)
assert.ok(!props[0].value)

assert.ok(props[1].node.type === 'Identifier')
assert.notOk(props[1].key)
assert.notOk(props[1].value)
assert.ok(!props[1].key)
assert.ok(!props[1].value)

assert.ok(props[2].node.type === 'TemplateLiteral')
assert.deepEqual(props[2].key, props[2].node)
assert.notOk(props[2].value)
assert.ok(!props[2].value)

assert.ok(props[3].node.type === 'Literal')
assert.notOk(props[3].key)
assert.notOk(props[3].value)
assert.ok(!props[3].key)
assert.ok(!props[3].value)
})
})

Expand Down
4 changes: 1 addition & 3 deletions tests/lib/utils/regexp.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
'use strict'

const { escape, toRegExp } = require('../../../lib/utils/regexp')
const chai = require('chai')

const assert = chai.assert
const assert = require('assert')

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