Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proof of slot mixin test having wrong assumption about polyfill being loaded #2357

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/ui/components/core/test/SlotMixin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,8 @@ describe('SlotMixin', () => {
});
});

describe('Scoped Registries', () => {
// eslint-disable-next-line no-only-tests/no-only-tests
describe.only('Scoped Registries', () => {
it('supports scoped elements when polyfill loaded', async () => {
const outputObj = mockScopedRegistry();

Expand Down Expand Up @@ -605,7 +606,8 @@ describe('SlotMixin', () => {
unMockScopedRegistry();
});

it('does not scope elements when polyfill not loaded', async () => {
// eslint-disable-next-line no-only-tests/no-only-tests
it.only('does not scope elements when polyfill not loaded', async () => {
// @ts-expect-error
ShadowRoot.prototype.createElement = null;
class ScopedEl extends LitElement {}
Expand Down
4 changes: 3 additions & 1 deletion web-test-runner.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const packages = fs
.filter(
dir => fs.statSync(`packages/${dir}`).isDirectory() && fs.existsSync(`packages/${dir}/test`),
)
.filter(dir => dir === 'ui')
.map(dir => ({ name: dir, path: `packages/${dir}/test` }))
.concat(
fs
Expand All @@ -17,6 +18,7 @@ const packages = fs
fs.statSync(`packages/ui/components/${dir}`).isDirectory() &&
fs.existsSync(`packages/ui/components/${dir}/test`),
)
.filter(dir => dir === 'core')
.map(dir => ({ name: dir, path: `packages/ui/components/${dir}/test` })),
);

Expand All @@ -28,7 +30,6 @@ const testRunnerHtml = testRunnerImport =>
`
<html>
<head>
<script src="/node_modules/@webcomponents/scoped-custom-element-registry/scoped-custom-element-registry.min.js"></script>
<script type="module" src="${testRunnerImport}"></script>
</head>
</html>
Expand All @@ -52,6 +53,7 @@ export default {
},
},
testRunnerHtml,
browserLogs: true,
browsers: [
playwrightLauncher({ product: 'firefox', concurrency: 1 }),
playwrightLauncher({ product: 'chromium' }),
Expand Down
Loading