Skip to content

Commit dd42e50

Browse files
committed
Fix test CWD
1 parent 3a4698e commit dd42e50

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/helpers/__tests__/getDtsSnapshot.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,12 @@ describe('utils / cssSnapshots', () => {
234234
});
235235

236236
it('should return an object with classes, css, and a source map', () => {
237+
if (cssExports.sourceMap?.sources) {
238+
const cwd = process.cwd();
239+
cssExports.sourceMap.sources = cssExports.sourceMap.sources.map((src) =>
240+
src.replace(cwd, '[cwd]'),
241+
);
242+
}
237243
expect(cssExports).toMatchSnapshot();
238244
});
239245

0 commit comments

Comments
 (0)