Skip to content

Commit

Permalink
eslint-module-utils: Unified test specs names to not use 'should' word
Browse files Browse the repository at this point in the history
  • Loading branch information
sompylasar committed Jun 4, 2017
1 parent a0012f8 commit f65c263
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions tests/src/core/getExports.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('ExportMap', function () {
parserPath: 'babel-eslint',
}

it('should handle ExportAllDeclaration', function () {
it('handles ExportAllDeclaration', function () {
var imports
expect(function () {
imports = ExportMap.get('./export-all', fakeContext)
Expand All @@ -24,12 +24,12 @@ describe('ExportMap', function () {

})

it('should return a cached copy on subsequent requests', function () {
it('returns a cached copy on subsequent requests', function () {
expect(ExportMap.get('./named-exports', fakeContext))
.to.exist.and.equal(ExportMap.get('./named-exports', fakeContext))
})

it('should not return a cached copy after modification', (done) => {
it('does not return a cached copy after modification', (done) => {
const firstAccess = ExportMap.get('./mutator', fakeContext)
expect(firstAccess).to.exist

Expand All @@ -42,7 +42,7 @@ describe('ExportMap', function () {
})
})

it('should not return a cached copy with different settings', () => {
it('does not return a cached copy with different settings', () => {
const firstAccess = ExportMap.get('./named-exports', fakeContext)
expect(firstAccess).to.exist

Expand All @@ -56,7 +56,7 @@ describe('ExportMap', function () {
.not.to.equal(firstAccess)
})

it('should not throw for a missing file', function () {
it('does not throw for a missing file', function () {
var imports
expect(function () {
imports = ExportMap.get('./does-not-exist', fakeContext)
Expand All @@ -66,7 +66,7 @@ describe('ExportMap', function () {

})

it('should export explicit names for a missing file in exports', function () {
it('exports explicit names for a missing file in exports', function () {
var imports
expect(function () {
imports = ExportMap.get('./exports-missing', fakeContext)
Expand Down
6 changes: 3 additions & 3 deletions tests/src/core/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ describe('parse(content, { settings, ecmaFeatures })', function () {
expect(parseSpy.args[0][1], 'custom parser to get parserOptions.filePath equal to the full path of the source file').to.have.property('filePath', path)
})

it('should throw on context == null', function () {
it('throws on context == null', function () {
expect(parse.bind(null, path, content, null)).to.throw(Error)
})

it('should throw on unable to resolve parserPath', function () {
it('throws on unable to resolve parserPath', function () {
expect(parse.bind(null, path, content, { settings: {}, parserPath: null })).to.throw(Error)
})

it('should take the alternate parser specified in settings', function () {
it('takes the alternate parser specified in settings', function () {
const parseSpy = sinon.spy()
const parserOptions = { ecmaFeatures: { jsx: true } }
parseStubParser.parse = parseSpy
Expand Down
2 changes: 1 addition & 1 deletion tests/src/core/resolve.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as fs from 'fs'
import * as utils from '../utils'

describe('resolve', function () {
it('should throw on bad parameters.', function () {
it('throws on bad parameters', function () {
expect(resolve.bind(null, null, null)).to.throw(Error)
})

Expand Down

0 comments on commit f65c263

Please sign in to comment.