Skip to content

Commit d349343

Browse files
feat(config): test for supported id prefix BM-1462 (#3590)
### Motivation Our recent release failed to publish our packages to NPM. We have since implemented support for NPM [trusted publishing] to resolve this. However, we need a minor change to force our packages to publish again. [trusted publishing]: https://docs.npmjs.com/trusted-publishers ### Modifications - **packages/config/** - **src/config/\_\_test\_\_/`config.test.ts`** - Added a test case to verify parsing fails for `BaseConfig` objects with an unsupported `id` prefix. ### Verification All tests succeed at the root-level by way of the `npm run test` command.
1 parent a430342 commit d349343

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/config/src/config/__test__/config.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ describe('BaseConfig', () => {
1111
const raw: BaseConfig = { id: 'foo', name: 'bar' };
1212
assert.throws(() => ConfigBase.parse(raw));
1313
});
14+
it('should fail with an unsupported id prefix', () => {
15+
const raw: BaseConfig = { id: 'zz_foo', name: 'bar' };
16+
assert.throws(() => ConfigBase.parse(raw));
17+
});
1418
it('should parse a config', () => {
1519
const raw: BaseConfig = { id: 'ts_foo', name: 'bar' };
1620
const obj = ConfigBase.parse(raw);

0 commit comments

Comments
 (0)