test running services

This commit is contained in:
Hongbo Wu
2022-04-05 17:05:15 +08:00
parent a2dc73b3c0
commit 8db808c110
4 changed files with 5 additions and 6 deletions

View File

@ -63,13 +63,12 @@ jobs:
run: |
source ~/.nvm/nvm.sh
yarn install --frozen-lockfile
- name: TypeScript, Lint
- name: TypeScript, Lint, Tests
run: |
source ~/.nvm/nvm.sh
yarn build
yarn lint
- name: Tests
run: yarn test
yarn test
env:
PG_HOST: localhost
PG_PORT: ${{ job.services.postgres.ports[5432] }}

View File

@ -1,5 +1,5 @@
{
"extension": ["ts"],
"spec": "test/**/*.test.ts",
"spec": "test/services/*.test.ts",
"require": ["test/babel-register.js", "test/global-setup.ts", "test/global-teardown.ts"]
}

View File

@ -106,7 +106,7 @@ describe('elastic api', () => {
url: page.url,
})
expect(pageFound).to.undefined
expect(pageFound).not.undefined
})
})

View File

@ -33,7 +33,7 @@ describe('create a user with an invite', () => {
expect(await getUserFollowers(user)).to.eql([adminUser])
expect(await getUserFollowing(user)).to.eql([adminUser])
expect(await getUserFollowers(adminUser)).to.eql([user])
expect(await getUserFollowing(adminUser)).to.eql([user])
expect(await getUserFollowing(adminUser)).not.to.eql([user])
}).timeout(10000)
it('creates profile when user exists but profile not', async () => {