30 lines
953 B
TypeScript
30 lines
953 B
TypeScript
import { readFileSync } from 'node:fs';
|
|
import { join } from 'node:path';
|
|
import { describe, expect, it } from 'vitest';
|
|
|
|
describe('release config', () => {
|
|
it('depends on the published identitydb 0.2.0 npm package', () => {
|
|
const packageJson = JSON.parse(
|
|
readFileSync(join(process.cwd(), 'package.json'), 'utf8'),
|
|
) as {
|
|
dependencies?: Record<string, string>;
|
|
trustedDependencies?: string[];
|
|
};
|
|
|
|
expect(packageJson.dependencies?.identitydb).toBe('0.2.0');
|
|
expect(packageJson.trustedDependencies).toEqual(
|
|
expect.arrayContaining(['better-sqlite3', 'esbuild']),
|
|
);
|
|
});
|
|
|
|
it('publishes without cloning a sibling IdentityDB repository first', () => {
|
|
const workflow = readFileSync(
|
|
join(process.cwd(), '.gitea/workflows/npm-release.yml'),
|
|
'utf8',
|
|
);
|
|
|
|
expect(workflow).not.toContain('Clone IdentityDB dependency');
|
|
expect(workflow).not.toContain('IDENTITYDB_URL');
|
|
});
|
|
});
|