alwaysai
Version:
The alwaysAI command-line interface (CLI)
23 lines • 825 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const model_id_1 = require("./model-id");
const { parse, serialize } = model_id_1.ModelId;
const parseData = [
['foo/bar', { publisher: 'foo', name: 'bar' }],
];
describe('ModelId', () => {
for (const [serialized, ModelId] of parseData) {
it(`parses "${serialized}"`, () => {
expect(parse(serialized)).toEqual(ModelId);
});
}
it('throws "expected model"', () => {
expect(() => parse('ssh://foo/')).toThrow(/expected model/i);
expect(() => parse('foo/bar/baz')).toThrow(/expected model/i);
});
it('consistency checks', () => {
const serialized = 'foo/bar';
expect(serialize(parse(serialized))).toBe(serialized);
});
});
//# sourceMappingURL=model-id.test.js.map