Skip to content

Commit

Permalink
[Tests] update chai to v4
Browse files Browse the repository at this point in the history
  • Loading branch information
timkraut authored and ljharb committed Feb 18, 2019
1 parent 651829d commit 246be82
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -49,7 +49,7 @@
"babel-preset-es2015-argon": "latest",
"babel-register": "^6.26.0",
"babylon": "^6.15.0",
"chai": "^3.5.0",
"chai": "^4.2.0",
"coveralls": "^3.0.2",
"cross-env": "^4.0.0",
"eslint": "2.x - 5.x",
Expand Down
24 changes: 12 additions & 12 deletions tests/src/core/getExports.js
Expand Up @@ -110,26 +110,26 @@ describe('ExportMap', function () {
expect(imports.has('fn')).to.be.true

expect(imports.get('fn'))
.to.have.deep.property('doc.tags[0].title', 'deprecated')
.to.have.nested.property('doc.tags[0].title', 'deprecated')
expect(imports.get('fn'))
.to.have.deep.property('doc.tags[0].description', "please use 'x' instead.")
.to.have.nested.property('doc.tags[0].description', 'please use \'x\' instead.')
})

it('works with default imports.', function () {
expect(imports.has('default')).to.be.true
const importMeta = imports.get('default')

expect(importMeta).to.have.deep.property('doc.tags[0].title', 'deprecated')
expect(importMeta).to.have.deep.property('doc.tags[0].description', 'this is awful, use NotAsBadClass.')
expect(importMeta).to.have.nested.property('doc.tags[0].title', 'deprecated')
expect(importMeta).to.have.nested.property('doc.tags[0].description', 'this is awful, use NotAsBadClass.')
})

it('works with variables.', function () {
expect(imports.has('MY_TERRIBLE_ACTION')).to.be.true
const importMeta = imports.get('MY_TERRIBLE_ACTION')

expect(importMeta).to.have.deep.property(
expect(importMeta).to.have.nested.property(
'doc.tags[0].title', 'deprecated')
expect(importMeta).to.have.deep.property(
expect(importMeta).to.have.nested.property(
'doc.tags[0].description', 'please stop sending/handling this action type.')
})

Expand All @@ -138,27 +138,27 @@ describe('ExportMap', function () {
expect(imports.has('CHAIN_A')).to.be.true
const importMeta = imports.get('CHAIN_A')

expect(importMeta).to.have.deep.property(
expect(importMeta).to.have.nested.property(
'doc.tags[0].title', 'deprecated')
expect(importMeta).to.have.deep.property(
expect(importMeta).to.have.nested.property(
'doc.tags[0].description', 'this chain is awful')
})
it('works for the second one', function () {
expect(imports.has('CHAIN_B')).to.be.true
const importMeta = imports.get('CHAIN_B')

expect(importMeta).to.have.deep.property(
expect(importMeta).to.have.nested.property(
'doc.tags[0].title', 'deprecated')
expect(importMeta).to.have.deep.property(
expect(importMeta).to.have.nested.property(
'doc.tags[0].description', 'so awful')
})
it('works for the third one, etc.', function () {
expect(imports.has('CHAIN_C')).to.be.true
const importMeta = imports.get('CHAIN_C')

expect(importMeta).to.have.deep.property(
expect(importMeta).to.have.nested.property(
'doc.tags[0].title', 'deprecated')
expect(importMeta).to.have.deep.property(
expect(importMeta).to.have.nested.property(
'doc.tags[0].description', 'still terrible')
})
})
Expand Down
2 changes: 1 addition & 1 deletion utils/ignore.js
@@ -1,4 +1,4 @@
"use strict"
'use strict'
exports.__esModule = true

const extname = require('path').extname
Expand Down

0 comments on commit 246be82

Please sign in to comment.