Skip to content

Commit

Permalink
test: fix page path
Browse files Browse the repository at this point in the history
  • Loading branch information
cncolder committed Jul 10, 2020
1 parent dcf83f7 commit dc67875
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"start": "tsc -w --preserveWatchOutput",
"prebuild": "rimraf dist tsconfig.tsbuildinfo",
"build": "tsc",
"pretest": "npm run build && taro build --type weapp",
"pretest": "taro build --type weapp",
"test": "jest",
"test:watch": "jest --watch",
"prepublishOnly": "npm run build",
Expand Down
34 changes: 15 additions & 19 deletions test/weapp.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,35 +31,31 @@ describe('weapp', () => {
miniProgram && (await miniProgram.close())
})

describe('antv', () => {
describe('f2', () => {
let page: Page
describe('antv f2', () => {
let page: Page

beforeAll(async () => {
page = await miniProgram.navigateTo('/pages/antv/f2')
})
beforeAll(async () => {
page = await miniProgram.navigateTo('/pages/antv-f2')
})

it('canvas', async () => {
let canvas = await page.$('canvas')
it('canvas', async () => {
let canvas = await page.$('canvas')

expect(canvas).toBeDefined()
})
expect(canvas).toBeDefined()
})
})

describe('react-spring', () => {
describe('animated', () => {
let page: Page
let page: Page

beforeAll(async () => {
page = await miniProgram.navigateTo('/pages/react-spring/animated')
})
beforeAll(async () => {
page = await miniProgram.navigateTo('/pages/react-spring')
})

it('#number', async () => {
let el = await page.$('#number')
it('#number', async () => {
let el = await page.$('#number')

await expect(el.text()).resolves.toBe('1')
})
await expect(el.text()).resolves.toBe('1')
})
})
})

0 comments on commit dc67875

Please sign in to comment.