mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
refactor: separate layer lifecycle from presentation
This commit is contained in:
1 parent
d2c9014c2d
commit
2d68841783
14 files changed
+2547
-2044
No files matched your search
@@ -107,3 +107,22 @@ test('a Node build export must be explicitly classified and scoped', async (t) =
|
||||
await writeFile(path.join(root, 'startup.js'), 'export const app = 2;');
|
||||
await assert.rejects(checkPackageBoundaries(root), /unowned module.*startup/);
|
||||
});
|
||||
|
||||
test('a lifecycle owner cannot acquire a layer panel even through an unused import', async (t) => {
|
||||
const root = await fixture(
|
||||
t,
|
||||
"import './panel.js'; export class LayerLifecycle {}",
|
||||
);
|
||||
await writeFile(path.join(root, 'panel.js'), 'export class LayerPanel {}');
|
||||
await writeFile(
|
||||
path.join(root, 'scripts/package-boundaries.json'),
|
||||
JSON.stringify({
|
||||
'layer-lifecycle': {
|
||||
exports: ['./feature'],
|
||||
modules: ['entry.js'],
|
||||
external: [],
|
||||
},
|
||||
}),
|
||||
);
|
||||
await assert.rejects(checkPackageBoundaries(root), /unowned module.*panel/);
|
||||
});
|
||||
Reference in new issue
Block a user