@@ -12,7 +12,8 @@ import typescript from "typescript";
12
12
13
13
// inject assert and a hidden _TYPESCRIPT_GLOBAL into global scope
14
14
const context = vm . createContext ( {
15
- assert : assert ,
15
+ assert,
16
+ structuredClone,
16
17
_TYPESCRIPT_GLOBAL : typescript ,
17
18
} ) ;
18
19
@@ -32,7 +33,7 @@ const test = new vm.SourceTextModule(
32
33
import { plugin, pluginVersion, eslintVersion, verify, verifyAndFix } from "dist.js";
33
34
34
35
// check no Node APIs are present, except injected 'assert' and '_TYPESCRIPT_GLOBAL'
35
- assert.equal(Object.keys(globalThis).length, 2 );
36
+ assert.equal(Object.keys(globalThis).length, 3 );
36
37
assert.equal(typeof assert, 'function');
37
38
assert.equal(typeof process, 'undefined');
38
39
assert.equal(typeof __dirname, 'undefined');
@@ -45,10 +46,11 @@ assert.equal(typeof verify, "function");
45
46
assert.equal(typeof verifyAndFix, "function");
46
47
47
48
// ensure that the standalone runs without crashing and returns results
48
- assert.deepStrictEqual(verify('let el = <div className="red" />'), [
49
- {
49
+ assert.deepStrictEqual(
50
+ verify('let el = <div className="red" />', { 'solid/no-react-specific-props': 2 }),
51
+ [{
50
52
ruleId: "solid/no-react-specific-props",
51
- severity: 1 ,
53
+ severity: 2 ,
52
54
message: "Prefer the \`class\` prop over the deprecated \`className\` prop.",
53
55
line: 1,
54
56
column: 15,
@@ -57,8 +59,8 @@ assert.deepStrictEqual(verify('let el = <div className="red" />'), [
57
59
endLine: 1,
58
60
endColumn: 30,
59
61
fix: { range: [14, 23], text: "class" },
60
- },
61
- ] );
62
+ }] ,
63
+ );
62
64
assert.deepStrictEqual(verifyAndFix('let el = <div className="red" />'), {
63
65
fixed: true,
64
66
messages: [],
0 commit comments