-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathExternalServerFunctions.test.js
More file actions
29 lines (25 loc) · 1.08 KB
/
ExternalServerFunctions.test.js
File metadata and controls
29 lines (25 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
beforeAll(async () => {
await page.goto('http://localhost:6969/external-server-functions')
})
describe('ExtermalServerFunctions', () => {
test('server functions can be invoked from the instance on client', async () => {
await page.waitForSelector('[data-client-method]')
const element = await page.$('[data-client-method]')
expect(element).toBeTruthy()
})
test('server functions can be invoked from the constructor constant on client', async () => {
await page.waitForSelector('[data-client-static]')
const element = await page.$('[data-client-static]')
expect(element).toBeTruthy()
})
test('server functions can be invoked from the instance on server', async () => {
await page.waitForSelector('[data-server-method]')
const element = await page.$('[data-server-method]')
expect(element).toBeTruthy()
})
test('server functions can be invoked from the constructor constant on server', async () => {
await page.waitForSelector('[data-server-static]')
const element = await page.$('[data-server-static]')
expect(element).toBeTruthy()
})
})