We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 172676c commit b0644aeCopy full SHA for b0644ae
detox/src/utils/tempfile.test.js
@@ -9,8 +9,14 @@ describe('tempfile', () => {
9
});
10
11
it('should work with the real tmp module', () => {
12
+ const tmpdir = require('node:os').tmpdir();
13
+ const path = require('node:path');
14
+
15
+ const expectedFile = path.join(tmpdir, `detox-${process.pid}-[a-zA-Z0-9]+.log`).replace(/\\/g, '\\\\');
16
+ const expectedResult = new RegExp(`^${expectedFile}$`);
17
18
const result = tempfile('.log');
- expect(result).toMatch(new RegExp(`^/var[/\\\\].*/detox-${process.pid}-[a-zA-Z0-9]+\\.log$`));
19
+ expect(result).toMatch(expectedResult);
20
21
22
0 commit comments