Skip to content

Commit

Permalink
Update parse.js
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Aug 4, 2019
1 parent 8f3f0d4 commit 5bcdb76
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/src/core/parse.js
Expand Up @@ -46,10 +46,8 @@ describe('parse(content, { settings, ecmaFeatures })', function () {
})

it('passes with custom `parseForESLint` parser', function () {
const parseForESLintSpy = sinon.spy(eslintParser.parseForESLint)
const parseSpy = sinon.spy()
eslintParser.parseForESLint = parseForESLintSpy
eslintParser.parse = parseSpy
const parseForESLintSpy = sinon.spy(eslintParser, 'parseForESLint')
const parseSpy = sinon.spy(eslintParser, 'parse')
parse(path, content, { settings: {}, parserPath: eslintParserPath })
expect(parseForESLintSpy.callCount, 'custom `parseForESLint` parser to be called once').to.equal(1)
expect(parseSpy.callCount, '`parseForESLint` takes higher priority than `parse`').to.equal(0)
Expand Down

0 comments on commit 5bcdb76

Please sign in to comment.