Skip to content

Commit

Permalink
chore: clean cli e2e package (api7#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
bzp2010 authored Jun 6, 2024
1 parent 4db76a7 commit 8bad40a
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 129 deletions.
5 changes: 5 additions & 0 deletions apps/cli-e2e/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# E2E Test for CLI

**Currently we don't do E2E testing on the cli, but rather unit testing and E2E testing in each module separately.**

**So this package is used as a placeholder in the project.**
9 changes: 0 additions & 9 deletions apps/cli-e2e/assets/apisix/apisix-config.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions apps/cli-e2e/assets/apisix/docker-compose.yaml

This file was deleted.

1 change: 0 additions & 1 deletion apps/cli-e2e/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export default {
preset: '../../jest.preset.js',
globalSetup: '<rootDir>/src/support/global-setup.ts',
globalTeardown: '<rootDir>/src/support/global-teardown.ts',
setupFiles: ['<rootDir>/src/support/test-setup.ts'],
testEnvironment: 'node',
transform: {
'^.+\\.[tj]s$': [
Expand Down
35 changes: 0 additions & 35 deletions apps/cli-e2e/src/apisix/ping.spec.ts

This file was deleted.

11 changes: 2 additions & 9 deletions apps/cli-e2e/src/support/global-setup.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/* eslint-disable */
var __TEARDOWN_MESSAGE__: string;

module.exports = async function () {
// Start services that that the app needs to run (e.g. database, docker-compose, etc.).
console.log('\nSetting up...\n');

// Hint: Use `globalThis` to pass variables to global teardown.
globalThis.__TEARDOWN_MESSAGE__ = '\nTearing down...\n';
export default () => {
/* */
};
8 changes: 2 additions & 6 deletions apps/cli-e2e/src/support/global-teardown.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/* eslint-disable */

module.exports = async function () {
// Put clean up logic here (e.g. stopping services, docker-compose, etc.).
// Hint: `globalThis` is shared between setup and teardown.
console.log(globalThis.__TEARDOWN_MESSAGE__);
export default () => {
/* */
};
50 changes: 0 additions & 50 deletions apps/cli-e2e/src/support/test-setup.ts

This file was deleted.

0 comments on commit 8bad40a

Please sign in to comment.