mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
5a38750188
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
19 lines
525 B
JavaScript
19 lines
525 B
JavaScript
import { expect } from 'chai';
|
|
import { getContext } from '../dist/index.js';
|
|
|
|
describe('context', () => {
|
|
it('no arguments', async () => {
|
|
const ctx = await getContext([]);
|
|
expect(ctx.version).to.eq('latest');
|
|
expect(ctx.dryRun).to.be.undefined;
|
|
});
|
|
it('tag', async () => {
|
|
const ctx = await getContext(['beta']);
|
|
expect(ctx.version).to.eq('beta');
|
|
expect(ctx.dryRun).to.be.undefined;
|
|
});
|
|
it('dry run', async () => {
|
|
const ctx = await getContext(['--dry-run']);
|
|
expect(ctx.dryRun).to.eq(true);
|
|
});
|
|
});
|