Skip to content

Commit 644c657

Browse files
committed
added ts tests
1 parent 8381cd8 commit 644c657

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

js/tests/defaultKernels.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@ sandboxTest('test js kernel', async ({ sandbox }) => {
66
const output = await sandbox.runCode('console.log("Hello World!")', { language: 'js' })
77
expect(output.logs.stdout).toEqual(['Hello World!\n'])
88
})
9+
10+
sandboxTest('test ts kernel', async ({ sandbox }) => {
11+
const output = await sandbox.runCode('const message: string = "Hello World!"; console.log(message)', { language: 'ts' })
12+
expect(output.logs.stdout).toEqual(['Hello World!\n'])
13+
})

python/tests/async/test_async_default_kernels.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,9 @@ async def test_js_kernel(async_sandbox: AsyncSandbox):
66
"console.log('Hello, World!')", language="js"
77
)
88
assert execution.logs.stdout == ["Hello, World!\n"]
9+
10+
async def test_ts_kernel(async_sandbox: AsyncSandbox):
11+
execution = await async_sandbox.run_code(
12+
"const message: string = 'Hello, World!'; console.log(message);", language="ts"
13+
)
14+
assert execution.logs.stdout == ["Hello, World!\n"]

python/tests/sync/test_default_kernels.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ def test_r_kernel(sandbox: Sandbox):
1818
def test_java_kernel(sandbox: Sandbox):
1919
execution = sandbox.run_code('System.out.println("Hello, World!")', language="java")
2020
assert execution.logs.stdout[0] == "Hello, World!"
21+
22+
23+
@pytest.mark.skip_debug()
24+
def test_ts_kernel(sandbox: Sandbox):
25+
execution = sandbox.run_code("const message: string = 'Hello, World!'; console.log(message)", language="ts")
26+
assert execution.logs.stdout == ["Hello, World!\n"]

0 commit comments

Comments
 (0)