Skip to content

Commit

Permalink
fixup test
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Apr 27, 2024
1 parent 5a88d9f commit 4d2eaa9
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions test/_unit.cjs
Expand Up @@ -61,11 +61,6 @@ suite('Lexer', () => {
assert.strictEqual(imports[5].t, 3);
});

test('Another regex case', () => {
parse(`import{readFileSync as e}from"fs";import{join as t}from"path";import o from"#db";import r from"#core/error_logger";let l={};let i={};function setFile(e){l=e}function autoSetFile(){try{let r=JSON.parse(e(t(o.theme.dirs.extra,"i18n.default.json")).toString());i=r}catch(e){r.couldNotLoadI18nDefault()}{let i=t(o.theme.dirs.extra,"i18n."+o.language+".json");try{let t=JSON.parse(e(i).toString());l=t}catch(e){r.couldNotLoadI18nFile()}}}function i18n(e){let t;if(/[0-9]/.test(e)){let o=[];for(let t of/[0-9]+/g.exec(e)){e=e.replace(t,"{NUMBER}");o.push(t)}t=l[e]??i[e]??e;for(let e of o)t=t.replace("{NUMBER}",e)}else t=l[e]??i[e]??e;return t}var a={i18n:i18n,setFile:setFile,autoSetFile:autoSetFile};export{a as default};
//# sourceMappingURL=i18n.js.map`);
});

test(`Regex case`, () => {
const source = `for(let t of/[0-9]+/g.exec(e)){}`
parse(source);
Expand Down

0 comments on commit 4d2eaa9

Please sign in to comment.