mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-18 16:32:33 +08:00
Merge pull request #1015 from TriliumNext/test_fix-flaky-getPlatformAppDataDir
test(data_dir): fix flaky getPlatformAppDataDir test on Windows
This commit is contained in:
commit
d2c2d945aa
@ -77,6 +77,11 @@ describe("data_dir.ts unit tests", async () => {
|
|||||||
["w/ darwin it should return '~/Library/Application Support'", ["darwin", undefined], "/Users/mock/Library/Application Support", "/Users/mock"]
|
["w/ darwin it should return '~/Library/Application Support'", ["darwin", undefined], "/Users/mock/Library/Application Support", "/Users/mock"]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
// make sure OS does not set its own process.env.APPDATA, so that we can use our own supplied value
|
||||||
|
delete process.env.APPDATA;
|
||||||
|
});
|
||||||
|
|
||||||
testCases.forEach((testCase) => {
|
testCases.forEach((testCase) => {
|
||||||
const [testDescription, fnValues, expected, osHomedirMockValue] = testCase;
|
const [testDescription, fnValues, expected, osHomedirMockValue] = testCase;
|
||||||
return it(testDescription, () => {
|
return it(testDescription, () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user