0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00
astro/packages/upgrade/test/context.test.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
525 B
JavaScript
Raw Normal View History

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);
});
});