feat(pi): add persistent Mosaic /goal controller (#1152)
This commit was merged in pull request #1152.
This commit is contained in:
@@ -209,6 +209,20 @@ describe('FileConfigAdapter.syncFramework — defaults seeding', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('deploys the Mosaic-owned Pi goal extension only inside the Mosaic runtime tree', async () => {
|
||||
const sourceRuntime = join(fixture.sourceDir, 'runtime', 'pi');
|
||||
mkdirSync(sourceRuntime, { recursive: true });
|
||||
writeFileSync(join(sourceRuntime, 'goal-extension.ts'), '// persistent goal extension\n');
|
||||
|
||||
const adapter = new FileConfigAdapter(fixture.mosaicHome, fixture.sourceDir);
|
||||
await adapter.syncFramework('fresh');
|
||||
|
||||
expect(
|
||||
readFileSync(join(fixture.mosaicHome, 'runtime', 'pi', 'goal-extension.ts'), 'utf-8'),
|
||||
).toBe('// persistent goal extension\n');
|
||||
expect(existsSync(join(fixture.mosaicHome, '.pi'))).toBe(false);
|
||||
});
|
||||
|
||||
it('is a no-op for seeding when defaults/ dir does not exist', async () => {
|
||||
rmSync(fixture.defaultsDir, { recursive: true });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user