build: remove fs-extra devdep (#42533)
* build: remove fs-extra dependency from script/gen-filenames.ts * build: remove fs-extra dependency from script/spec-runner.js * build: remove fs-extra dependency from script/gn-asar.js * build: remove fs-extra dependency from spec/api-autoupdater-darwin-spec.ts * build: remove fs-extra dependency from spec/api-safe-storage-spec.ts * build: remove fs-extra dependency from spec/lib/codesign-helpers.ts * build: remove fs-extra dependency from spec/api-app-spec.ts * build: remove fs-extra dependency from spec/esm-spec.ts * build: remove fs-extra dependency from spec/lib/fs-helpers.ts * build: remove fs-extra dependency from spec/lib/api-shell-spec.ts * build: remove fs-extra dependency from spec/api-context-bridge-spec.ts * build: remove fs-extra dependency from spec/asar-integrity-spec.ts * build: remove fs-extra dependency from spec/node-spec.ts * build: remove fs-extra devdiv * fixup! build: remove fs-extra dependency from spec/api-context-bridge-spec.ts * fix: use force: true when removing directories * chore: reduce diffs to main
This commit is contained in:
parent
8e8ea3ee8b
commit
dad6e130f5
15 changed files with 55 additions and 80 deletions
|
@ -3,7 +3,7 @@ import { shell } from 'electron/common';
|
|||
import { closeAllWindows } from './lib/window-helpers';
|
||||
import { ifdescribe, ifit, listen } from './lib/spec-helpers';
|
||||
import * as http from 'node:http';
|
||||
import * as fs from 'fs-extra';
|
||||
import * as fs from 'node:fs';
|
||||
import * as os from 'node:os';
|
||||
import * as path from 'node:path';
|
||||
import { expect } from 'chai';
|
||||
|
@ -79,9 +79,9 @@ describe('shell module', () => {
|
|||
afterEach(closeAllWindows);
|
||||
|
||||
it('moves an item to the trash', async () => {
|
||||
const dir = await fs.mkdtemp(path.resolve(app.getPath('temp'), 'electron-shell-spec-'));
|
||||
const dir = await fs.promises.mkdtemp(path.resolve(app.getPath('temp'), 'electron-shell-spec-'));
|
||||
const filename = path.join(dir, 'temp-to-be-deleted');
|
||||
await fs.writeFile(filename, 'dummy-contents');
|
||||
await fs.promises.writeFile(filename, 'dummy-contents');
|
||||
await shell.trashItem(filename);
|
||||
expect(fs.existsSync(filename)).to.be.false();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue