KAN-51: add isolated Tauri macOS app scaffold
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import test from 'node:test';
|
||||
import { en } from '../ui/locales/en.js';
|
||||
|
||||
const html = readFileSync(new URL('../ui/index.html', import.meta.url), 'utf8');
|
||||
|
||||
test('every launcher text resolves to a nonempty English translation', () => {
|
||||
for (const [, key] of html.matchAll(/data-i18n="([^"]+)"/g)) {
|
||||
assert.equal(typeof en[key], 'string', key);
|
||||
assert.ok(en[key].trim(), key);
|
||||
}
|
||||
});
|
||||
|
||||
test('the launcher opens only the configured HTTPS workspace without an IPC bridge', () => {
|
||||
const links = [...html.matchAll(/<a\s[^>]*href="([^"]+)"/g)];
|
||||
assert.equal(links.length, 1);
|
||||
assert.equal(links[0][1], 'https://kanbangit.de/');
|
||||
const main = readFileSync(
|
||||
new URL('../ui/main.js', import.meta.url),
|
||||
'utf8',
|
||||
);
|
||||
assert.doesNotMatch(main, /__TAURI__|invoke\(/);
|
||||
});
|
||||
Reference in New Issue
Block a user