Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 826 Bytes

contributing.md

File metadata and controls

55 lines (39 loc) · 826 Bytes

Contributing

Installation

Follow the installation procedure.

Continuous Build

npm run build:watch
npm run api
npm run app

Lint

npm run lint

# or
npm run lint:code
npm run lint:scss

Test

npm run test

NB: Running tests will truncate the Database.

Writing test

Test in it() should be self-sufficient and possible to execute in parallel of any other tests. If API is needed, your test should seed the data it needs with random identifier

// example
it('should fail to get an user', async () => {
  const { token } = await seedSimpleUser();
  const res = await fetch.get('/0/me', { token });
  expect(res.status).toBe(403);
});

Database

# Run migration
npm run db:migrate

# Create migration
npm run db:migrate:create