Skip to content

Running Japa tests on subdomain (tenant) #3712

Answered by carlmathisen
carlmathisen asked this question in Help
Discussion options

You must be logged in to vote

Ok, I got it working by adding the port to my apiClient configuration:

tests/bootstrap.ts

...
const port = Env.get('PORT')
const testUrl = `http://test.${domain}:${port}`
export const plugins: Config['plugins'] = [assert(), runFailedTests(), apiClient(testUrl)]
...

I hope this is useful for someone else too. Let me know if there's a better way. Thanks!

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@victorLessa
Comment options

@NullVoxPopuli
Comment options

@NullVoxPopuli
Comment options

@RomainLanz
Comment options

Answer selected by carlmathisen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
4 participants