mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-21 00:11:27 -07:00
Prepare Windows release and signing process (#16)
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
|
||||
test('dictionary roots main handler returns expected root list', () => {
|
||||
const roots = createBuildDictionaryRootsMainHandler({
|
||||
platform: 'darwin',
|
||||
dirname: '/repo/dist/main',
|
||||
appPath: '/Applications/SubMiner.app/Contents/Resources/app.asar',
|
||||
resourcesPath: '/Applications/SubMiner.app/Contents/Resources',
|
||||
@@ -44,6 +45,7 @@ test('jlpt dictionary runtime main deps builder maps search paths and log prefix
|
||||
|
||||
test('frequency dictionary roots main handler returns expected root list', () => {
|
||||
const roots = createBuildFrequencyDictionaryRootsMainHandler({
|
||||
platform: 'darwin',
|
||||
dirname: '/repo/dist/main',
|
||||
appPath: '/Applications/SubMiner.app/Contents/Resources/app.asar',
|
||||
resourcesPath: '/Applications/SubMiner.app/Contents/Resources',
|
||||
@@ -59,6 +61,42 @@ test('frequency dictionary roots main handler returns expected root list', () =>
|
||||
assert.equal(roots[10], '/repo');
|
||||
});
|
||||
|
||||
test('dictionary roots main handler uses APPDATA-style roots on windows', () => {
|
||||
const roots = createBuildDictionaryRootsMainHandler({
|
||||
platform: 'win32',
|
||||
dirname: 'C:\\repo\\dist\\main',
|
||||
appPath: 'C:\\Program Files\\SubMiner\\resources\\app.asar',
|
||||
resourcesPath: 'C:\\Program Files\\SubMiner\\resources',
|
||||
userDataPath: 'C:\\Users\\a\\AppData\\Roaming\\SubMiner',
|
||||
appUserDataPath: 'C:\\Users\\a\\AppData\\Roaming\\SubMiner',
|
||||
homeDir: 'C:\\Users\\a',
|
||||
appDataDir: 'C:\\Users\\a\\AppData\\Roaming',
|
||||
cwd: 'C:\\repo',
|
||||
joinPath: (...parts) => parts.join('\\'),
|
||||
})();
|
||||
|
||||
assert.equal(roots.includes('C:\\Users\\a\\.config\\SubMiner'), false);
|
||||
assert.equal(roots.includes('C:\\Users\\a\\AppData\\Roaming\\SubMiner'), true);
|
||||
});
|
||||
|
||||
test('frequency dictionary roots main handler uses APPDATA-style roots on windows', () => {
|
||||
const roots = createBuildFrequencyDictionaryRootsMainHandler({
|
||||
platform: 'win32',
|
||||
dirname: 'C:\\repo\\dist\\main',
|
||||
appPath: 'C:\\Program Files\\SubMiner\\resources\\app.asar',
|
||||
resourcesPath: 'C:\\Program Files\\SubMiner\\resources',
|
||||
userDataPath: 'C:\\Users\\a\\AppData\\Roaming\\SubMiner',
|
||||
appUserDataPath: 'C:\\Users\\a\\AppData\\Roaming\\SubMiner',
|
||||
homeDir: 'C:\\Users\\a',
|
||||
appDataDir: 'C:\\Users\\a\\AppData\\Roaming',
|
||||
cwd: 'C:\\repo',
|
||||
joinPath: (...parts) => parts.join('\\'),
|
||||
})();
|
||||
|
||||
assert.equal(roots.includes('C:\\Users\\a\\.config\\SubMiner'), false);
|
||||
assert.equal(roots.includes('C:\\Users\\a\\AppData\\Roaming\\SubMiner'), true);
|
||||
});
|
||||
|
||||
test('frequency dictionary runtime main deps builder maps search paths/source and log prefix', () => {
|
||||
const calls: string[] = [];
|
||||
const deps = createBuildFrequencyDictionaryRuntimeMainDepsHandler({
|
||||
|
||||
Reference in New Issue
Block a user