@@ -3,6 +3,7 @@ import { existsSync } from 'fs'
3
3
import * as fs from 'fs/promises'
4
4
import * as path from 'path'
5
5
import { afterEach , beforeEach , describe , expect , test } from 'vitest'
6
+ import { Language } from '../../../src/commands/template/generators'
6
7
7
8
describe ( 'Template Init' , ( ) => {
8
9
let testDir : string
@@ -20,10 +21,8 @@ describe('Template Init', () => {
20
21
}
21
22
} )
22
23
23
- const languages = [ 'typescript' , 'python-sync' , 'python-async' ] as const
24
-
25
24
describe ( 'CLI Options' , ( ) => {
26
- languages . forEach ( ( language ) => {
25
+ Object . values ( Language ) . forEach ( ( language ) => {
27
26
test ( `should generate files with --name and --language ${ language } ` , async ( ) => {
28
27
const templateName = 'my-test-template'
29
28
@@ -199,7 +198,7 @@ describe('Template Init', () => {
199
198
expect ( templateContent ) . toContain ( "import { Template } from 'e2b'" )
200
199
expect ( templateContent ) . toContain ( 'export const template = Template()' )
201
200
expect ( templateContent ) . toContain ( 'fromImage' )
202
- expect ( templateContent ) . toContain ( 'ubuntu:22.04 ' )
201
+ expect ( templateContent ) . toContain ( 'e2bdev/base ' )
203
202
} )
204
203
205
204
test ( 'should generate correct Python template content' , async ( ) => {
@@ -219,7 +218,7 @@ describe('Template Init', () => {
219
218
expect ( templateContent ) . toContain ( 'template = (' )
220
219
expect ( templateContent ) . toContain ( 'Template()' )
221
220
expect ( templateContent ) . toContain ( 'from_image' )
222
- expect ( templateContent ) . toContain ( 'ubuntu:22.04 ' )
221
+ expect ( templateContent ) . toContain ( 'e2bdev/base ' )
223
222
} )
224
223
225
224
test ( 'should generate correct async Python template content' , async ( ) => {
0 commit comments