0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
astro/packages/upgrade/test/context.test.js
Nate Moore 5a38750188
Add @astrojs/upgrade package for automatic package upgrades (#8525)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-11-27 17:00:59 -06:00

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