mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
Fix injectfile test on Windows (#162)
This commit is contained in:
parent
8780fcb662
commit
26d97bbe3e
@ -163,16 +163,16 @@ describe('Puppeteer', function() {
|
|||||||
|
|
||||||
describe('Page.injectFile', function() {
|
describe('Page.injectFile', function() {
|
||||||
it('should work', SX(async function() {
|
it('should work', SX(async function() {
|
||||||
const helloPath = path.join(__dirname, './assets/injectedfile.js');
|
const helloPath = path.join(__dirname, 'assets', 'injectedfile.js');
|
||||||
await page.injectFile(helloPath);
|
await page.injectFile(helloPath);
|
||||||
const result = await page.evaluate(() => __injected);
|
const result = await page.evaluate(() => __injected);
|
||||||
expect(result).toBe(42);
|
expect(result).toBe(42);
|
||||||
}));
|
}));
|
||||||
it('should include sourcemap', SX(async function() {
|
it('should include sourcemap', SX(async function() {
|
||||||
const helloPath = path.join(__dirname, './assets/injectedfile.js');
|
const helloPath = path.join(__dirname, 'assets', 'injectedfile.js');
|
||||||
await page.injectFile(helloPath);
|
await page.injectFile(helloPath);
|
||||||
const result = await page.evaluate(() => __injectedError.stack);
|
const result = await page.evaluate(() => __injectedError.stack);
|
||||||
expect(result).toContain('assets/injectedfile.js');
|
expect(result).toContain(path.join('assets', 'injectedfile.js'));
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user