Skip to content

Commit

Permalink
Test: Remove expectation from automated tests config
Browse files Browse the repository at this point in the history
Best if it’s in the title
  • Loading branch information
dieulot committed Aug 22, 2023
1 parent 0bb3032 commit eb2f026
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ async function fillHeaderWithTests(header) {
tests.push({testDir, ...testConfig})
}

let testsHtml = tests.map((value) => `<a href="/tests/${value.testDir}/index.html" data-no-instant>${value.title}${value.expectation}</a>`)
let testsHtml = tests.map((value) => `<a href="/tests/${value.testDir}/index.html" data-no-instant>${value.title}</a>`)
header = header.replace('<nav></nav>', `<nav>${testsHtml}</nav>`)

return header
Expand Down
2 changes: 0 additions & 2 deletions test/tests/_template/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ export const environment = {
//cacheMaxAge: false,
}

export const expectation = ''

export function checkExpectation(data) {
return false
}
4 changes: 1 addition & 3 deletions test/tests/hover-long-enough-then-click/config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
export const title = 'Hover long enough to prefetch, then click (no cache)'
export const title = 'Uses prefetch cache when clicking after having hovered long enough to prefetch, without HTTP caching set'

export const environment = {
pageLoadTime: 200,
cacheMaxAge: false,
}

export const expectation = 'Navigated page is from prefetch cache'

export function checkExpectation(data) {
return data.transferSize === 0
}
2 changes: 0 additions & 2 deletions test/tests/no-double-download/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ export const environment = {
cacheMaxAge: 2,
}

export const expectation = 'No double download'

export function checkExpectation(data) {
return data.transferSize === 0
}

0 comments on commit eb2f026

Please sign in to comment.