mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-02 21:01:21 +00:00
@@ -103,3 +103,20 @@ test('lazy runtime boundary keeps the eager entry independent and does not grow
|
||||
);
|
||||
assert.ok(anyCount <= 1123, `src any count grew from 1123 to ${anyCount}`);
|
||||
});
|
||||
|
||||
test('source type references stay portable across build hosts', () => {
|
||||
const sources = [];
|
||||
const visit = (directory) => {
|
||||
for (const name of readdirSync(directory)) {
|
||||
const path = join(directory, name);
|
||||
if (statSync(path).isDirectory()) visit(path);
|
||||
else if (/\.ts$/.test(name)) sources.push(readFileSync(path, 'utf8'));
|
||||
}
|
||||
};
|
||||
visit(join(repoRoot, 'src'));
|
||||
assert.doesNotMatch(
|
||||
sources.join('\n'),
|
||||
/import\(["'][A-Za-z]:[\\/]/,
|
||||
'type imports must not capture an absolute Windows workspace path',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -168,7 +168,11 @@ test('release ZIP inspection is portable and does not depend on tar', () => {
|
||||
assert.equal(archived.status, 0, archived.stderr || archived.stdout);
|
||||
const entries = readZipEntries(zip, ['manifest.json', 'frontend/houseplan-card.js']);
|
||||
assert.equal(typeof JSON.parse(entries.get('manifest.json').toString('utf8')).version, 'string');
|
||||
assert.ok(entries.get('frontend/houseplan-card.js').length > 1_000);
|
||||
const entry = entries.get('frontend/houseplan-card.js');
|
||||
// #337 deliberately turns the public entry into a tiny bootstrap; the
|
||||
// manifest-driven verifier owns completeness of its hashed asset tree.
|
||||
assert.ok(entry.length > 100);
|
||||
assert.match(entry.toString('utf8'), /__HOUSEPLAN_BUILD_FINGERPRINT__/);
|
||||
const committedResult = spawnSync('git', ['show', 'HEAD:dist/houseplan-card.js'], {
|
||||
cwd: root,
|
||||
// The production bundle is larger than Node's spawnSync default buffer.
|
||||
|
||||
Reference in New Issue
Block a user