Skip to content

Commit be7c189

Browse files
committed
update test
1 parent 66bd940 commit be7c189

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/playground/.testRun.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export { testRun }
22

3-
import { page, test, expect, run, getServerUrl, autoRetry, fetchHtml } from '@brillout/test-e2e'
3+
import { page, test, expect, expectLog, run, getServerUrl, autoRetry, fetchHtml } from '@brillout/test-e2e'
44
import { testCounter } from '../utils'
55

66
function testRun(cmd: 'npm run dev' | 'npm run preview') {
@@ -40,6 +40,11 @@ function testRun(cmd: 'npm run dev' | 'npm run preview') {
4040
const resp = await makeTelefuncHttpRequest(1337)
4141
expect(resp.status).toBe(422)
4242
expect(await resp.text()).toBe('Shield Validation Error')
43+
// [14:10:31.724][/.test-preview.test.ts][npm run preview][stderr] Shield Validation Error: the arguments passed to the telefunction onLoad() (/pages/index/Hello.telefunc.ts) have the wrong type. Arguments: `[{"name":1337}]`. Wrong type: [root] > [tuple: element 0] > [object: value of key `name`] is `number` but should be `string`.
44+
expectLog('Shield Validation Error', {
45+
filter: (log) =>
46+
log.logSource === 'stderr' && log.logText.includes('onLoad()') && log.logText.includes('Hello.telefunc.ts'),
47+
})
4348
}
4449
})
4550
}

0 commit comments

Comments
 (0)