playwright/tests/electron/electron-app.js

12 lines
370 B
JavaScript
Raw Normal View History

const { app, protocol } = require('electron');
const path = require('path');
2021-02-01 22:43:26 +03:00
app.on('window-all-closed', e => e.preventDefault());
app.whenReady().then(() => {
protocol.registerFileProtocol('vscode-file', (request, callback) => {
const url = request.url.substring('vscode-file'.length + 3);
callback({ path: path.join(__dirname, 'assets', url) });
});
});