Skip to content

Commit

Permalink
chore: Add more Compose command tests
Browse files Browse the repository at this point in the history
  • Loading branch information
angelmadames committed Feb 20, 2024
1 parent 1225edd commit 3aed370
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/commands/compose.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ import { composeExecParams, composeFiles } from '../../src/utils/compose';
describe("Command: 'compose'", () => {
const config = projectConfig();

test('Returns compose files string', () => {
const composeFileString = composeFiles({});
test('Returns compose exec params', () => {
const composeSettingsString = composeExecParams();

expect(composeFileString).toBeArray();
expect(composeSettingsString).toContain(
`--env-file ${projectConfig().paths.env_file}`,
);
Expand All @@ -18,6 +15,12 @@ describe("Command: 'compose'", () => {
);
});

test('Returns compose files params', () => {
const files = composeFiles({});
expect(files).toBeArray();
expect(files.join(' ').split(' ')).toContain('--file');
})

test('Returns error when no arguments', () => {
const command = Bun.spawnSync(['./cli.ts', 'compose']);
expect(command.stdout.toString()).toContain(
Expand Down

0 comments on commit 3aed370

Please sign in to comment.