Skip to content

Commit

Permalink
Merge 4d81055 into d1ae0ff
Browse files Browse the repository at this point in the history
  • Loading branch information
augustjk committed Jul 25, 2022
2 parents d1ae0ff + 4d81055 commit 5be311a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/four-rocks-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@lit-labs/testing': patch
---

Make resolved paths sent to worker be file urls. Fixes incompatibility with Windows filepaths.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@
"./packages/labs/gen-utils:test",
"./packages/labs/gen-wrapper-angular:test",
"./packages/labs/gen-wrapper-react:test",
"./packages/labs/gen-wrapper-vue:test"
"./packages/labs/gen-wrapper-vue:test",
"./packages/labs/testing:test"
]
}
},
Expand Down
5 changes: 3 additions & 2 deletions packages/labs/testing/src/lib/lit-ssr-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import {Worker} from 'worker_threads';
import * as pathlib from 'path';
import {pathToFileURL} from 'node:url';
import {litSsrPluginCommand} from './constants.js';

import type {TemplateResult} from 'lit';
Expand All @@ -29,8 +30,8 @@ export function litSsrPlugin(): TestRunnerPlugin<Payload> {
}

const {template, modules} = payload;
const resolvedModules = modules.map((module) =>
pathlib.join(process.cwd(), module)
const resolvedModules = modules.map(
(module) => pathToFileURL(pathlib.join(process.cwd(), module)).href
);

let resolve: (value: string) => void;
Expand Down

0 comments on commit 5be311a

Please sign in to comment.