Skip to content

Commit

Permalink
Remove runtime-checks (#1066)
Browse files Browse the repository at this point in the history
* POC remove runtime-checks

* explicity add types/node

* Fake enabled features for remote test

---------

Co-authored-by: Shane Osbourne <sosbourne@duckduckgo.com>
  • Loading branch information
jonathanKingston and Shane Osbourne authored Oct 10, 2024
1 parent b217b27 commit f99315b
Show file tree
Hide file tree
Showing 43 changed files with 42 additions and 3,833 deletions.
1 change: 0 additions & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ inject/windows.js @jonathanKingston @q71114 @szanto90balazs

# Test owners
integration-tests/test-pages/ @kdzwinel @jonathanKingston
unit-tests/script-overload-snapshots/ @shakyShane @jonathanKingston @englehardt
10 changes: 8 additions & 2 deletions integration-test/playwright/remote-pages.spec.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
import { test, expect } from '@playwright/test'
import path from 'path'
import { readFileSync } from 'fs'
import { baseFeatures } from '../../src/features.js'

const testRoot = path.join('integration-test', 'playwright')

function getHARPath (harFile) {
return path.join(testRoot, 'data', 'har', harFile)
}

const config = './integration-test/test-pages/runtime-checks/config/replace-element.json'
const css = readFileSync('./build/integration/contentScope.js', 'utf8')
const parsedConfig = JSON.parse(readFileSync(config, 'utf8'))
const parsedConfig = {}
// Construct a parsed config object with all base features enabled
Object.keys(baseFeatures).forEach((key) => {
parsedConfig[key] = {
enabled: 'enabled'
}
})

function wrapScript (js, replacements) {
for (const [find, replace] of Object.entries(replacements)) {
Expand Down
17 changes: 0 additions & 17 deletions integration-test/test-pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,23 +71,6 @@ describe('Test integration pages', () => {
}
}

describe('Runtime checks', () => {
const pages = {
'runtime-checks/pages/basic-run.html': 'runtime-checks/config/basic-run.json',
'runtime-checks/pages/replace-element.html': 'runtime-checks/config/replace-element.json',
'runtime-checks/pages/filter-props.html': 'runtime-checks/config/filter-props.json',
'runtime-checks/pages/shadow-dom.html': 'runtime-checks/config/shadow-dom.json',
'runtime-checks/pages/script-overload.html': 'runtime-checks/config/script-overload.json',
'runtime-checks/pages/generic-overload.html': 'runtime-checks/config/generic-overload.json'
}
for (const pageName in pages) {
const configName = pages[pageName]
it(`${pageName}`, async () => {
await testPage(pageName, process.cwd() + '/integration-test/test-pages/' + configName)
})
}
})

it('Web compat shims correctness', async () => {
await testPage(
'webcompat/pages/shims.html',
Expand Down
67 changes: 0 additions & 67 deletions integration-test/test-pages/runtime-checks/config/basic-run.json

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

45 changes: 0 additions & 45 deletions integration-test/test-pages/runtime-checks/config/shadow-dom.json

This file was deleted.

Loading

0 comments on commit f99315b

Please sign in to comment.