Skip to content

Commit

Permalink
Add another matching test for behavior from two commits ago.
Browse files Browse the repository at this point in the history
Part of #2.
  • Loading branch information
jkomoros committed Jun 25, 2023
1 parent 84d154e commit 3969030
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion test/base/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,32 @@ describe('Garden smoke test', () => {
assert.deepStrictEqual(result, golden);
});

it('a nested seed can define its own id', async() => {
const garden = loadTestGarden([]);
//We can't just do a manually typed SeedPacket because its type doesn't
//explicitly allow nesting due to the error descrbied in
//makeNestedSeedData, issue #16.
const packet = seedPacket.parse({
version: 0,
seeds: {
'': {
'type': 'log',
'value': {
'id': 'foo',
'type': 'log',
'value': true
}
}
}
});
garden.plantSeedPacket('test/base/foo.json', packet);
const seed = await garden.seed('foo');
const result = await seed.grow();
const golden = true;
assert.deepStrictEqual(result, golden);
});


//TODO: a named inner value doesn't pass.
});

describe('expandSeedPacket tests', () => {
Expand Down

0 comments on commit 3969030

Please sign in to comment.