-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathDateParser.test.js
More file actions
27 lines (23 loc) · 979 Bytes
/
DateParser.test.js
File metadata and controls
27 lines (23 loc) · 979 Bytes
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
beforeAll(async () => {
await page.goto('http://localhost:6969/date-parser')
})
describe('DateParser', () => {
test('dates in the instance are instances of Date in ssr mode', async () => {
const element = await page.$('[data-ssr-instance-year="92"]')
expect(element).toBeTruthy()
})
test('dates in the context are instances of Date in ssr mode', async () => {
const element = await page.$('[data-ssr-context-year="92"]')
expect(element).toBeTruthy()
})
test('dates in the instance are instances of Date in spa mode', async () => {
await page.waitForSelector('[data-spa-instance-year="92"]')
const element = await page.$('[data-spa-instance-year="92"]')
expect(element).toBeTruthy()
})
test('dates in the context are instances of Date in spa mode', async () => {
await page.waitForSelector('[data-spa-context-year="92"]')
const element = await page.$('[data-spa-context-year="92"]')
expect(element).toBeTruthy()
})
})