|
| 1 | +import { join } from 'path'; |
1 | 2 | import * as loader from './loader-impl'; |
2 | 3 | import * as helpers from '../util/helpers'; |
3 | 4 |
|
@@ -28,7 +29,7 @@ describe('webpack loader', () => { |
28 | 29 | const mockContext = getMockContext(); |
29 | 30 | const mockSourceMap = { }; |
30 | 31 | const sourceString = 'sourceString'; |
31 | | - const fakePath = '/some/path/content.js'; |
| 32 | + const fakePath = join(process.cwd(), 'some', 'path', 'content.js'); |
32 | 33 | const fakeContent = 'SomeFileContent'; |
33 | 34 | const mockWebpackObject = getMockWebpackObject(fakePath); |
34 | 35 | const spy = jasmine.createSpy('mock webpack callback'); |
@@ -61,7 +62,7 @@ describe('webpack loader', () => { |
61 | 62 |
|
62 | 63 | const mockSourceMap = { }; |
63 | 64 | const sourceString = 'sourceString'; |
64 | | - const fakePath = '/some/path/content.js'; |
| 65 | + const fakePath = join(process.cwd(), 'some', 'path', 'content.js'); |
65 | 66 | const fakeContent = `{"test": "test"}`; |
66 | 67 | const mockWebpackObject = getMockWebpackObject(fakePath); |
67 | 68 | const spy = jasmine.createSpy('mock webpack callback'); |
@@ -99,7 +100,7 @@ describe('webpack loader', () => { |
99 | 100 | const mockContext = getMockContext(); |
100 | 101 | const mockSourceMap = { }; |
101 | 102 | const sourceString = 'sourceString'; |
102 | | - const fakePath = '/some/path/content.js'; |
| 103 | + const fakePath = join(process.cwd(), 'some', 'path', 'content.js'); |
103 | 104 | const mockWebpackObject = getMockWebpackObject(fakePath); |
104 | 105 | const spy = jasmine.createSpy('mock webpack callback'); |
105 | 106 | spy.and.callFake(() => { |
@@ -128,7 +129,7 @@ describe('webpack loader', () => { |
128 | 129 | const mockContext = getMockContext(); |
129 | 130 | const mockSourceMap = { }; |
130 | 131 | const sourceString = 'sourceString'; |
131 | | - const fakePath = '/some/path/content.js'; |
| 132 | + const fakePath = join(process.cwd(), 'some', 'path', 'content.js'); |
132 | 133 | const fakeContent = `{"test": "test"}`; |
133 | 134 | const mockWebpackObject = getMockWebpackObject(fakePath); |
134 | 135 | const callbackSpy = jasmine.createSpy('mock webpack callback'); |
|
0 commit comments