generated from JS-DevTools/template-node-typescript
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathoverrides.spec.js
30 lines (23 loc) · 956 Bytes
/
overrides.spec.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"use strict";
const eslintConfig = require("../..");
const { expect } = require("chai");
for (let override of eslintConfig.overrides) {
describe(`${override.files} overrides`, () => {
it("should explicitly set parserOptions.sourceType", () => {
expect(override.parserOptions).to.be.an("object");
expect(override.parserOptions.sourceType).to.be.a("string").with.length.above(0);
});
it("should explicitly set parserOptions.ecmaVersion", () => {
expect(override.parserOptions).to.be.an("object");
expect(override.parserOptions.ecmaVersion).to.equal(2020);
});
it("should explicitly set env.es2020", () => {
expect(override.env).to.be.an("object");
expect(override.env.es2020).to.equal(true);
});
it("should explicitly set env.shared-node-browser", () => {
expect(override.env).to.be.an("object");
expect(override.env["shared-node-browser"]).to.equal(true);
});
});
}