Skip to content

Commit 72124f8

Browse files
committed
- Update unit test
- Code lint
1 parent 5a0d499 commit 72124f8

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

test/routes/variantText/variantText.test.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const checkVariantTextsProjectPermissions = (reports) => {
7474
};
7575

7676
const ensureProjectVariantTextJoinTable = async () => {
77-
const [rows] = await db.query("SELECT to_regclass('public.project_variant_text_join') AS table_name;");
77+
const [rows] = await db.query('SELECT to_regclass(\'public.project_variant_text_join\') AS table_name;');
7878

7979
if (!rows[0] || !rows[0].table_name) {
8080
await db.query(`
@@ -278,7 +278,7 @@ describe('/variant-text', () => {
278278

279279
describe('PUT - /:variantText', () => {
280280
test('/ - 200 Success', async () => {
281-
const res = await request
281+
await request
282282
.put(`${BASE_URI}/${variantText.ident}`)
283283
.query({
284284
groups: [{name: VARIANT_EDIT_ACCESS}],
@@ -384,7 +384,9 @@ describe('/variant-text', () => {
384384
.type('json')
385385
.expect(HTTP_STATUS.OK);
386386

387-
expect(res.body).toHaveLength(0);
387+
expect(res.body).not.toHaveLength(0);
388+
expect(res.body.map((variantTextResponse) => {return variantTextResponse.ident;}))
389+
.toContain(variantTextOpt.ident);
388390
});
389391

390392
test('POST / - 400 test constraint on null project', async () => {

0 commit comments

Comments
 (0)