Skip to content

Commit

Permalink
🎨 Create deces-updates index before running mocha test
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianpb committed Jul 14, 2021
1 parent 4664ddf commit cc0874e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion backend/src/server.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,21 @@ import { Person } from './models/entities';
import { promisify } from 'util';
import { parseString } from '@fast-csv/parse';
import { writeToBuffer } from '@fast-csv/format';
import { initUpdateIndex, updateFieldsToIndex } from './updatedIds';
import fs from "fs";
import chai from 'chai';
import chaiHttp = require('chai-http');
import 'mocha';

chai.use(chaiHttp);
const finishedAsync:any = promisify(finished);

describe('server.ts - Express application', () => {

before(async () => {
await initUpdateIndex();
await updateFieldsToIndex();
})

let totalPersons: number;
const apiPath = (api: string): string => {
return `${process.env.BACKEND_PROXY_PATH}/${api}`
Expand Down

0 comments on commit cc0874e

Please sign in to comment.