Skip to content

Commit f015d27

Browse files
committed
add id to plugin tests
1 parent 3bea172 commit f015d27

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

scripts/plugin-tests.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,6 +1230,7 @@ let pluginTests = {
12301230
} catch (e) {
12311231
assert.deepStrictEqual(e.warnings, [])
12321232
assert.deepStrictEqual(e.errors, [{
1233+
id: '',
12331234
pluginName: '',
12341235
text: 'Expected ";" but found "y"',
12351236
location: {
@@ -1250,6 +1251,7 @@ let pluginTests = {
12501251
async transformUndefinedDetailForWarning({ esbuild }) {
12511252
const result = await esbuild.transform('typeof x == "null"')
12521253
assert.deepStrictEqual(result.warnings, [{
1254+
id: 'impossible-typeof',
12531255
pluginName: '',
12541256
text: 'The "typeof" operator will never evaluate to "null"',
12551257
location: {
@@ -1282,6 +1284,7 @@ let pluginTests = {
12821284
} catch (e) {
12831285
assert.deepStrictEqual(e.warnings, [])
12841286
assert.deepStrictEqual(e.errors, [{
1287+
id: '',
12851288
pluginName: '',
12861289
text: 'Expected ";" but found "y"',
12871290
location: {
@@ -1306,6 +1309,7 @@ let pluginTests = {
13061309
logLevel: 'silent',
13071310
})
13081311
assert.deepStrictEqual(result.warnings, [{
1312+
id: 'impossible-typeof',
13091313
pluginName: '',
13101314
text: 'The "typeof" operator will never evaluate to "null"',
13111315
location: {
@@ -1427,6 +1431,7 @@ let pluginTests = {
14271431
assert.strictEqual(e.warnings.length, 0)
14281432
assert.strictEqual(e.errors.length, 1)
14291433
assert.deepStrictEqual(e.errors[0], {
1434+
id: '',
14301435
pluginName: 'the-plugin',
14311436
text: 'some error',
14321437
location: {
@@ -1500,6 +1505,7 @@ let pluginTests = {
15001505
})
15011506
assert.strictEqual(result.warnings.length, 1)
15021507
assert.deepStrictEqual(result.warnings[0], {
1508+
id: '',
15031509
pluginName: 'other-plugin',
15041510
text: 'some warning',
15051511
location: {
@@ -1575,6 +1581,7 @@ let pluginTests = {
15751581
assert.strictEqual(e.warnings.length, 0)
15761582
assert.strictEqual(e.errors.length, 1)
15771583
assert.deepStrictEqual(e.errors[0], {
1584+
id: '',
15781585
pluginName: 'the-plugin',
15791586
text: 'some error',
15801587
location: {
@@ -1647,6 +1654,7 @@ let pluginTests = {
16471654
})
16481655
assert.strictEqual(result.warnings.length, 1)
16491656
assert.deepStrictEqual(result.warnings[0], {
1657+
id: '',
16501658
pluginName: 'the-plugin',
16511659
text: 'some warning',
16521660
location: {

0 commit comments

Comments
 (0)