Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 7c5237c

Browse files
committed
test: fix testings
1 parent d176071 commit 7c5237c

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

plugins/css_test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import cssLoader from './css.ts'
33

44
Deno.test('css loader', async () => {
55
const loader = cssLoader()
6-
const { code } = await loader.transform({
6+
const { code } = await loader.transform!({
77
url: '/test.css',
88
content: (new TextEncoder).encode('h1 { font-size: 18px; }'),
99
})
@@ -15,7 +15,7 @@ Deno.test('css loader', async () => {
1515

1616
Deno.test('css loader for inline style', async () => {
1717
const loader = cssLoader()
18-
const { code, type } = await loader.transform({
18+
const { code, type } = await loader.transform!({
1919
url: '#inline-style-{}',
2020
content: (new TextEncoder).encode('h1 { font-size: 18px; }'),
2121
})
@@ -27,7 +27,7 @@ Deno.test('css loader in production mode', async () => {
2727
Deno.env.set('BUILD_MODE', 'production')
2828

2929
const loader = cssLoader()
30-
const { code } = await loader.transform({
30+
const { code } = await loader.transform!({
3131
url: '/test.css',
3232
content: (new TextEncoder).encode('h1 { font-size: 18px; }'),
3333
})
@@ -38,7 +38,7 @@ Deno.test('css loader in production mode', async () => {
3838

3939
Deno.test('css loader with postcss plugins', async () => {
4040
const loader = cssLoader({ postcss: { plugins: ['postcss-nested'] } })
41-
const { code } = await loader.transform({
41+
const { code } = await loader.transform!({
4242
url: '/test.css',
4343
content: (new TextEncoder).encode('.foo { .bar { font-size: 100%; } }'),
4444
})

plugins/sass_test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import sassLoader from './sass.ts'
33

44
Deno.test('scss loader', async () => {
55
const loader = sassLoader()
6-
const { code, type } = await loader.transform({
6+
const { code, type } = await loader.transform!({
77
url: '/test.scss',
88
content: (new TextEncoder).encode('$someVar: 123px; .some-selector { width: $someVar; }'),
99
})
@@ -15,7 +15,7 @@ Deno.test('scss loader', async () => {
1515

1616
Deno.test('sass loader', async () => {
1717
const loader = sassLoader()
18-
const { code, type } = await loader.transform({
18+
const { code, type } = await loader.transform!({
1919
url: '/test.sass',
2020
content: (new TextEncoder).encode('$someVar: 123px\n.some-selector\n width: 123px'),
2121
})
@@ -27,7 +27,7 @@ Deno.test('sass loader', async () => {
2727

2828
Deno.test('sass loader with options', async () => {
2929
const loader = sassLoader({ indentType: 'tab', indentWidth: 2 })
30-
const { code, type } = await loader.transform({
30+
const { code, type } = await loader.transform!({
3131
url: '/test.sass',
3232
content: (new TextEncoder).encode('$someVar: 123px\n.some-selector\n width: 123px'),
3333
})

plugins/wasm_test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { assertEquals } from 'https://deno.land/[email protected]/testing/asserts.ts'
22
import wasmLoader from './wasm.ts'
33

44
Deno.test('wasm loader', async () => {
5-
const loader = wasmLoader()
65
const wasmBytes = new Uint8Array([
76
0, 97, 115, 109, 1, 0, 0, 0, 1, 133, 128, 128, 128, 0, 1, 96, 0, 1, 127,
87
3, 130, 128, 128, 128, 0, 1, 0, 4, 132, 128, 128, 128, 0, 1, 112, 0, 0,
@@ -11,7 +10,8 @@ Deno.test('wasm loader', async () => {
1110
105, 110, 0, 0, 10, 138, 128, 128, 128, 0, 1, 132, 128, 128, 128, 0, 0,
1211
65, 42, 11
1312
])
14-
const { code } = await loader.transform({
13+
const loader = wasmLoader()
14+
const { code } = await loader.transform!({
1515
url: '42.wasm',
1616
content: wasmBytes
1717
})

0 commit comments

Comments
 (0)