Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't import test code #686

Closed
wilsonianb opened this issue Oct 24, 2022 · 0 comments · Fixed by #691
Closed

Don't import test code #686

wilsonianb opened this issue Oct 24, 2022 · 0 comments · Fixed by #691
Assignees
Labels
pkg: backend Changes in the backend package. type: bug Something isn't working type: localenv Local playground

Comments

@wilsonianb
Copy link
Contributor

wilsonianb commented Oct 24, 2022

The local playground currently has the following:

local-backend-1       | /workspace/packages/backend/dist/shared/routes.test.js:62
local-backend-1       | test.todo('test suite must contain at least one test');
local-backend-1       | ^
local-backend-1       | 
local-backend-1       | ReferenceError: test is not defined
local-backend-1       |     at Object.<anonymous> (/workspace/packages/backend/dist/shared/routes.test.js:62:1)
local-backend-1       |     at Module._compile (node:internal/modules/cjs/loader:1126:14)
local-backend-1       |     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
local-backend-1       |     at Module.load (node:internal/modules/cjs/loader:1004:32)
local-backend-1       |     at Function.Module._load (node:internal/modules/cjs/loader:839:12)
local-backend-1       |     at Module.require (node:internal/modules/cjs/loader:1028:19)
local-backend-1       |     at require (node:internal/modules/cjs/helpers:102:18)
local-backend-1       |     at Object.<anonymous> (/workspace/packages/backend/dist/open_payments/client/service.js:15:23)
local-backend-1       |     at Module._compile (node:internal/modules/cjs/loader:1126:14)
local-backend-1       |     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
local-peer-backend-1  | /workspace/packages/backend/dist/shared/routes.test.js:62
local-peer-backend-1  | test.todo('test suite must contain at least one test');
local-peer-backend-1  | ^
local-peer-backend-1  | 
local-peer-backend-1  | ReferenceError: test is not defined
local-peer-backend-1  |     at Object.<anonymous> (/workspace/packages/backend/dist/shared/routes.test.js:62:1)
local-peer-backend-1  |     at Module._compile (node:internal/modules/cjs/loader:1126:14)
local-peer-backend-1  |     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
local-peer-backend-1  |     at Module.load (node:internal/modules/cjs/loader:1004:32)
local-peer-backend-1  |     at Function.Module._load (node:internal/modules/cjs/loader:839:12)
local-peer-backend-1  |     at Module.require (node:internal/modules/cjs/loader:1028:19)
local-peer-backend-1  |     at require (node:internal/modules/cjs/helpers:102:18)
local-peer-backend-1  |     at Object.<anonymous> (/workspace/packages/backend/dist/open_payments/client/service.js:15:23)
local-peer-backend-1  |     at Module._compile (node:internal/modules/cjs/loader:1126:14)
local-peer-backend-1  |     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
local-backend-1 exited with code 1

This is due to the following import(s) in non-test code:

// TODO: move out of *.tests
import { setup } from '../../shared/routes.test'
// TODO: move out of /tests
import { createContext } from '../../tests/context'

@wilsonianb wilsonianb added type: bug Something isn't working pkg: backend Changes in the backend package. type: localenv Local playground labels Oct 24, 2022
@wilsonianb wilsonianb self-assigned this Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: backend Changes in the backend package. type: bug Something isn't working type: localenv Local playground
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant