Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
willdurand committed Jun 29, 2020
1 parent df93b28 commit 960eae7
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions tests/unit/scanners/test.javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe('JavaScript Scanner', () => {
const jsScanner = new JavaScriptScanner(code, 'code.js');

const { linterMessages } = await jsScanner.scan();
expect(linterMessages.length).toEqual(0);
expect(linterMessages).toEqual([]);
});

it('should support object spread syntax', async () => {
Expand All @@ -100,7 +100,7 @@ describe('JavaScript Scanner', () => {
const jsScanner = new JavaScriptScanner(code, 'code.js');

const { linterMessages } = await jsScanner.scan();
expect(linterMessages.length).toEqual(0);
expect(linterMessages).toEqual([]);
});

it('should support optional chaining', async () => {
Expand All @@ -109,7 +109,7 @@ describe('JavaScript Scanner', () => {
const jsScanner = new JavaScriptScanner(code, 'code.js');

const { linterMessages } = await jsScanner.scan();
expect(linterMessages.length).toEqual(0);
expect(linterMessages).toEqual([]);
});

it('should support nullish coalescing operator', async () => {
Expand All @@ -118,17 +118,18 @@ describe('JavaScript Scanner', () => {
const jsScanner = new JavaScriptScanner(code, 'code.js');

const { linterMessages } = await jsScanner.scan();
expect(linterMessages.length).toEqual(0);
expect(linterMessages).toEqual([]);
});

// See: https://github.com/tc39/proposal-class-fields
// eslint-disable-next-line jest/no-disabled-tests
it.skip('should support public class fields', async () => {
const code = 'class MyClass { a = 1; }';

const jsScanner = new JavaScriptScanner(code, 'code.js');

const { linterMessages } = await jsScanner.scan();
expect(linterMessages.length).toEqual(0);
expect(linterMessages).toEqual([]);
});

it('should support BigInt short-hand notation', async () => {
Expand All @@ -137,7 +138,7 @@ describe('JavaScript Scanner', () => {
const jsScanner = new JavaScriptScanner(code, 'code.js');

const { linterMessages } = await jsScanner.scan();
expect(linterMessages.length).toEqual(0);
expect(linterMessages).toEqual([]);
});

it('should support dynamic imports', async () => {
Expand All @@ -146,7 +147,7 @@ describe('JavaScript Scanner', () => {
const jsScanner = new JavaScriptScanner(code, 'code.js');

const { linterMessages } = await jsScanner.scan();
expect(linterMessages.length).toEqual(0);
expect(linterMessages).toEqual([]);
});

it('should support es6 modules', async () => {
Expand All @@ -168,7 +169,7 @@ describe('JavaScript Scanner', () => {
const jsScanner = new JavaScriptScanner(code, 'code.js');

const { linterMessages } = await jsScanner.scan();
expect(linterMessages.length).toEqual(0);
expect(linterMessages).toEqual([]);
});

it('should scan node modules', async () => {
Expand Down Expand Up @@ -260,7 +261,7 @@ describe('JavaScript Scanner', () => {
const jsScanner = new JavaScriptScanner(code, 'badcode.js');

const { linterMessages } = await jsScanner.scan();
expect(linterMessages.length).toEqual(0);
expect(linterMessages).toEqual([]);
});

// This test is pretty much copied from ESLint, to make sure dependencies
Expand Down Expand Up @@ -362,7 +363,7 @@ describe('JavaScript Scanner', () => {
);

const { linterMessages } = await runJsScanner(jsScanner);
expect(linterMessages.length).toEqual(0);
expect(linterMessages).toEqual([]);
});
});

Expand Down

0 comments on commit 960eae7

Please sign in to comment.