@@ -5,6 +5,7 @@ import { fileURLToPath } from 'node:url';
55import { exec , type PromiseWithChild } from 'node:child_process' ;
66import { beforeAll , describe , test } from 'vitest' ;
77import { create , type LanguageType , type TemplateType } from '../index.ts' ;
8+ import { installAddon , officialAddons } from '../../cli/lib/index.ts' ;
89
910// Resolve the given path relative to the current file
1011const resolve_path = ( path : string ) => fileURLToPath ( new URL ( path , import . meta. url ) ) ;
@@ -42,13 +43,13 @@ for (const template of templates) {
4243 fs . rmSync ( cwd , { recursive : true , force : true } ) ;
4344
4445 create ( cwd , { name : `create-svelte-test-${ template } -${ types } ` , template, types } ) ;
46+ await installAddon ( { cwd, addons : { eslint : officialAddons . eslint } , options : { eslint : { } } } ) ;
4547
4648 const pkg = JSON . parse ( fs . readFileSync ( path . join ( cwd , 'package.json' ) , 'utf-8' ) ) ;
4749
4850 // run provided scripts that are non-blocking. All of them should exit with 0
4951 // package script requires lib dir
50- // TODO: lint should run before format
51- const scripts_to_test = [ 'format' , 'lint' , 'check' , 'build' , 'package' ] . filter (
52+ const scripts_to_test = [ 'lint' , 'format' , 'check' , 'build' , 'package' ] . filter (
5253 ( s ) => s in pkg . scripts
5354 ) ;
5455
0 commit comments