Skip to content

Commit c2344e8

Browse files
committed
Fix create tests
1 parent f8df8f2 commit c2344e8

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

examples/data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ const CONFIG_TEMPLATES: Template[] = [
345345
name: 'config-stylelint',
346346
uiContext: ['newTab'],
347347
uiFramework: undefined,
348-
css: 'css',
348+
css: 'sass',
349349
hasBackground: false,
350350
hasEnv: false,
351351
configFiles: ['.stylelintrc.json']

programs/create/create.spec.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,17 @@ describe('extension create', () => {
9595
).toBeTruthy()
9696
}
9797

98+
if (template.name.includes('esm')) {
99+
expect(
100+
fileExists(template.name, `${context.toLowerCase()}/scripts.mjs`)
101+
).toBeTruthy()
98102
// Expect [uiContext]/[uiContext].[ext] for scripts
99-
expect(
100-
fileExists(template.name, `${context.toLowerCase()}/scripts.${ext}`)
101-
).toBeTruthy()
103+
} else {
104+
expect(
105+
fileExists(template.name, `${context.toLowerCase()}/scripts.${ext}`)
106+
).toBeTruthy()
107+
}
108+
102109

103110
// Expect [uiContext]/styles.sass|less|css for styles
104111
if (template.css === 'sass') {

0 commit comments

Comments
 (0)