Skip to content

Commit

Permalink
Add test case to cover smart brace matching
Browse files Browse the repository at this point in the history
  • Loading branch information
alangpierce committed Sep 15, 2022
1 parent 8e3f254 commit 295cee3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/imports-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,18 @@ return obj && obj.__esModule ? obj : { default: obj }; }
import {namedName} from 'module2' assert {type: "json"};
import "module3" assert {type: "json"};
export * from "module4" assert {type: "json"};
// Arbitrary expressions like these aren't actually allowed right now, but
// exercise the ability to detect matching braces.
import test from "module5" assert {type: {foo: "test"}};
`,
`"use strict";${ESMODULE_PREFIX}${IMPORT_DEFAULT_PREFIX}${CREATE_STAR_EXPORT_PREFIX}
var _module1 = require('module1'); var _module12 = _interopRequireDefault(_module1);
var _module2 = require('module2');
require('module3');
var _module4 = require('module4'); _createStarExport(_module4);
// Arbitrary expressions like these aren't actually allowed right now, but
// exercise the ability to detect matching braces.
var _module5 = require('module5'); var _module52 = _interopRequireDefault(_module5);
`,
);
});
Expand Down

0 comments on commit 295cee3

Please sign in to comment.