Skip to content

Commit

Permalink
fix attribute selector syntax used in test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Nov 1, 2024
1 parent c64e720 commit 948158a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/plugin-renderer-lit/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class LitHydrationResource extends ResourceInterface {
const hydrationSupportScriptPath = '/node_modules/@lit-labs/ssr-client/lit-element-hydrate-support.js';
let body = await response.text();

// this needs to come first before any userland code
// but before any import maps
// this needs to come first before any userland code, but before any import maps
// https://github.com/ProjectEvergreen/greenwood/pull/1289
if (isDevelopment) {
// quick way to find the ending position of the importmap <script> tag
// and append the hydration support <script> right after it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ describe('Develop Greenwood With: ', function() {

it('should have the expected lit hydration script _after_ any importmaps in the <head>', function() {
// make sure this does NOT come before an importmap
const scripts = Array.from(dom.window.document.querySelectorAll('script[src*="lit-element-hydrate-support"] + script[type="importmap"'));
const scripts = Array.from(dom.window.document.querySelectorAll('script[src*="lit-element-hydrate-support"] + script[type="importmap"]'));

expect(scripts.length).to.equal(0);
});
Expand Down
2 changes: 1 addition & 1 deletion test/smoke-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function commonIndexSpecs(dom, html, label) {
});

it('should not have any module based <script> tags that come _before_ any importmaps in the <head>', function() {
const scripts = Array.from(dom.window.document.querySelectorAll('script[type="module"] + script[type*="importmap"'));
const scripts = Array.from(dom.window.document.querySelectorAll('script[type="module"] + script[type*="importmap"]'));

expect(scripts.length).to.equal(0);
});
Expand Down

0 comments on commit 948158a

Please sign in to comment.