@@ -12,7 +12,8 @@ import typescript from "typescript";
1212
1313// inject assert and a hidden _TYPESCRIPT_GLOBAL into global scope
1414const context = vm . createContext ( {
15- assert : assert ,
15+ assert,
16+ structuredClone,
1617 _TYPESCRIPT_GLOBAL : typescript ,
1718} ) ;
1819
@@ -32,7 +33,7 @@ const test = new vm.SourceTextModule(
3233import { plugin, pluginVersion, eslintVersion, verify, verifyAndFix } from "dist.js";
3334
3435// 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 );
3637assert.equal(typeof assert, 'function');
3738assert.equal(typeof process, 'undefined');
3839assert.equal(typeof __dirname, 'undefined');
@@ -45,10 +46,11 @@ assert.equal(typeof verify, "function");
4546assert.equal(typeof verifyAndFix, "function");
4647
4748// 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+ [{
5052 ruleId: "solid/no-react-specific-props",
51- severity: 1 ,
53+ severity: 2 ,
5254 message: "Prefer the \`class\` prop over the deprecated \`className\` prop.",
5355 line: 1,
5456 column: 15,
@@ -57,8 +59,8 @@ assert.deepStrictEqual(verify('let el = <div className="red" />'), [
5759 endLine: 1,
5860 endColumn: 30,
5961 fix: { range: [14, 23], text: "class" },
60- },
61- ] );
62+ }] ,
63+ );
6264assert.deepStrictEqual(verifyAndFix('let el = <div className="red" />'), {
6365 fixed: true,
6466 messages: [],
0 commit comments