23 lines
912 B
JavaScript
23 lines
912 B
JavaScript
|
|
import assert from 'node:assert/strict'
|
||
|
|
import { readFile } from 'node:fs/promises'
|
||
|
|
import test from 'node:test'
|
||
|
|
|
||
|
|
const readJson = async path => JSON.parse(await readFile(path, 'utf8'))
|
||
|
|
|
||
|
|
test('local native candidate has an isolated macOS identity', async () => {
|
||
|
|
const [base, candidate, packageJson] = await Promise.all([
|
||
|
|
readJson('src-tauri/tauri.conf.json'),
|
||
|
|
readJson('src-tauri/tauri.local-candidate.conf.json'),
|
||
|
|
readJson('package.json'),
|
||
|
|
])
|
||
|
|
|
||
|
|
assert.equal(base.version, '0.4.6')
|
||
|
|
assert.equal(candidate.productName, 'HoloLake Era · 本地方向候选 0.4.6')
|
||
|
|
assert.equal(candidate.identifier, 'com.guanghulab.hololake.local-candidate')
|
||
|
|
assert.notEqual(candidate.identifier, base.identifier)
|
||
|
|
assert.equal(candidate.app.windows[0].title, candidate.productName)
|
||
|
|
assert.match(
|
||
|
|
packageJson.scripts['package:local-candidate:macos'],
|
||
|
|
/tauri\.local-candidate\.conf\.json/,
|
||
|
|
)
|
||
|
|
})
|