Skip to content

Commit 4c2a428

Browse files
committed
🚧 Clean up only test flags and test script
1 parent 352ddba commit 4c2a428

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"clean": "npm-run-all clean-dist clean-built",
3838
"clean-dist": "rimraf dist",
3939
"clean-built": "rimraf built",
40-
"test": "env TS_NODE_PROJECT=src/test/tsconfig.json mocha -r ts-node/register --exit src/test/cli.exec.buildKit.1.test.ts",
40+
"test": "env TS_NODE_PROJECT=src/test/tsconfig.json mocha -r ts-node/register --exit src/test/*.test.ts",
4141
"test-matrix": "env TS_NODE_PROJECT=src/test/tsconfig.json mocha -r ts-node/register --exit",
4242
"test-container-features": "env TS_NODE_PROJECT=src/test/tsconfig.json mocha -r ts-node/register --exit src/test/container-features/*.test.ts",
4343
"test-container-features-cli": "env TS_NODE_PROJECT=src/test/tsconfig.json mocha -r ts-node/register --exit src/test/container-features/featuresCLICommands.test.ts",

src/test/cli.build.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe('Dev Containers CLI', function () {
5353
await shellExec(`${cli} build --workspace-folder ${testFolder} --image-name demo:v1`);
5454
const tags = await shellExec(`docker images --format "{{.Tag}}" demo`);
5555
const imageTags = tags.stdout.trim().split('\n').filter(tag => tag !== '<none>');
56-
assert.equal(imageTags.length, 1, 'There should be only one tag for demo:v1');
56+
assert.equal(imageTags.length, 1, 'There should be only one tag for demo:v1');
5757
} catch (error) {
5858
assert.equal(error.code, 'ERR_ASSERTION', 'Should fail with ERR_ASSERTION');
5959
}
@@ -424,7 +424,7 @@ describe('Dev Containers CLI', function () {
424424
assert.strictEqual(envListToObj(details.Config.Env).SUBFOLDER_CONFIG_IMAGE_ENV, 'true');
425425
});
426426

427-
it.only('should apply build options', async () => {
427+
it'should apply build options', async () => {
428428
const testFolder = `${__dirname}/configs/dockerfile-with-target`;
429429
const res = await shellExec(`${cli} build --workspace-folder ${testFolder}`);
430430
const response = JSON.parse(res.stdout);
@@ -434,7 +434,7 @@ describe('Dev Containers CLI', function () {
434434
assert.strictEqual(details.Config.Labels?.test_build_options, 'success');
435435
});
436436

437-
it.only('should build with default workspace folder', async () => {
437+
it'should build with default workspace folder', async () => {
438438
const testFolder = `${__dirname}/configs/dockerfile-with-target`;
439439
const res = await shellExec(`${cli} build`, { cwd: testFolder });
440440
const response = JSON.parse(res.stdout);

src/test/cli.exec.base.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ export function describeTests1({ text, options }: BuildKitOption) {
3030
const testFolder = `${__dirname}/configs/image`;
3131
beforeEach(async () => containerId = (await devContainerUp(cli, testFolder, options)).containerId);
3232
afterEach(async () => await devContainerDown({ containerId }));
33-
it.only('should execute successfully', async () => {
33+
it'should execute successfully', async () => {
3434
const res = await shellBufferExec(`${cli} exec --workspace-folder ${testFolder} echo hi`);
3535
assert.strictEqual(res.code, 0);
3636
assert.equal(res.signal, undefined);
3737
assert.strictEqual(res.stdout.toString(), 'hi\n');
3838
});
39-
it.only('should execute without a workspace folder', async () => {
39+
it'should execute without a workspace folder', async () => {
4040
const res = await shellBufferExec(`${cli} exec echo hi`, { cwd: testFolder});
4141
assert.strictEqual(res.code, 0);
4242
assert.equal(res.signal, undefined);
@@ -388,7 +388,7 @@ export function describeTests2({ text, options }: BuildKitOption) {
388388
assert.match(res.stdout, /howdy, node/);
389389
});
390390
});
391-
391+
392392
it('should fail with "not found" error when config is not found', async () => {
393393
let success = false;
394394
try {

src/test/cli.set-up.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ describe('Dev Containers CLI', function () {
7979
});
8080
});
8181

82-
describe.only('Command read-configuration', () => {
82+
describe'Command read-configuration', () => {
8383
it('should succeed and return postAttachCommand from config', async () => {
8484

8585
const containerId = (await shellExec(`docker run -d alpine:3.17 sleep inf`)).stdout.trim();

src/test/cli.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('Dev Containers CLI', function () {
2727
});
2828

2929
describe('Command run-user-commands', () => {
30-
describe.only('with valid config', () => {
30+
describe'with valid config', () => {
3131
let containerId: string | null = null;
3232
const testFolder = `${__dirname}/configs/image`;
3333
beforeEach(async () => containerId = (await devContainerUp(cli, testFolder)).containerId);
@@ -130,4 +130,4 @@ describe('Dev Containers CLI', function () {
130130
assert.strictEqual(response.configuration.remoteEnv.SUBFOLDER_CONFIG_REMOTE_ENV, 'true');
131131
});
132132
});
133-
});
133+
});

src/test/container-features/lockfile.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ describe('Lockfile', function () {
9292

9393
const res = await shellExec(`${cli} outdated --workspace-folder ${workspaceFolder} --output-format json`);
9494
const response = JSON.parse(res.stdout);
95-
95+
9696
const git = response.features['ghcr.io/devcontainers/features/git:1.0'];
9797
assert.ok(git);
9898
assert.strictEqual(git.current, '1.0.4');
@@ -125,7 +125,7 @@ describe('Lockfile', function () {
125125
assert.strictEqual(foo.latestMajor, '2');
126126
});
127127

128-
it.only('outdated command with text output', async () => {
128+
it'outdated command with text output', async () => {
129129
const workspaceFolder = path.join(__dirname, 'configs/lockfile-outdated-command');
130130

131131
const res = await shellExec(`${cli} outdated --workspace-folder ${workspaceFolder} --output-format text`);
@@ -151,8 +151,8 @@ describe('Lockfile', function () {
151151
assert.ok(!response.includes('terraform'));
152152
assert.ok(!response.includes('myfeatures'));
153153
});
154-
155-
it.only('outdated command without workspace', async () => {
154+
155+
it'outdated command without workspace', async () => {
156156
const workspaceFolder = path.join(__dirname, 'configs/lockfile-outdated-command');
157157

158158
const res = await shellExec(`${cli} outdated --output-format text`, { cwd: workspaceFolder });
@@ -263,4 +263,4 @@ describe('Lockfile', function () {
263263
await cleanup();
264264
}
265265
});
266-
});
266+
});

0 commit comments

Comments
 (0)