Skip to content

Commit

Permalink
Merge pull request #1000 from Chia-Network/tests--fix-import-chai-in-…
Browse files Browse the repository at this point in the history
…tests

tests: fix chai import in tests
  • Loading branch information
TheLastCicada authored Feb 7, 2024
2 parents 7285d50 + af06028 commit baed040
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 18 deletions.
5 changes: 2 additions & 3 deletions tests/integration/project.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import _ from 'lodash';

import chai from 'chai';
const { expect } = chai;
import { expect } from 'chai';

import * as testFixtures from '../test-fixtures';
import { pullPickListValues } from '../../src/utils/data-loaders';
Expand All @@ -27,7 +26,7 @@ describe('Project Resource Integration Tests', function () {
/*
Basic Idea for this test is that we are going to create a project and verify that
the new project propagates through the data layer and into our db. Then we are going
to delete the same project and make sure the delete command propagates through the datalayer
to delete the same project and make sure the delete command propagates through the datalayer
then gets removed from our db.
*/
// create and commit the project to be deleted
Expand Down
5 changes: 2 additions & 3 deletions tests/integration/unit.spec.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import _ from 'lodash';

import chai from 'chai';
import { expect } from 'chai';
import supertest from 'supertest';
const { expect } = chai;

import app from '../../src/server';
import { UnitMirror } from '../../src/models';
Expand Down Expand Up @@ -37,7 +36,7 @@ describe('Unit Resource Integration Tests', function () {
/*
Basic Idea for this test is that we are going to create a unit and verify that
the new unit propagates through the data layer and into our db. Then we are going
to delete the same unit and make sure the delete command propagates through the datalayer
to delete the same unit and make sure the delete command propagates through the datalayer
then gets removed from our db.
*/
// create and commit the unit to be deleted
Expand Down
3 changes: 1 addition & 2 deletions tests/resources/projects.spec.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import chai from 'chai';
import { expect } from 'chai';
import _ from 'lodash';
import * as testFixtures from '../test-fixtures';
import sinon from 'sinon';
import datalayer from '../../src/datalayer';
const { expect } = chai;
import newProject from '../test-data/new-project.js';
import supertest from 'supertest';
import app from '../../src/server';
Expand Down
3 changes: 1 addition & 2 deletions tests/test-fixtures/common-fixtures.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import chai from 'chai';
const { expect } = chai;
import { expect } from 'chai';

import {
RelatedProject,
Expand Down
3 changes: 1 addition & 2 deletions tests/test-fixtures/project-fixtures.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import _ from 'lodash';

import supertest from 'supertest';
import chai from 'chai';
const { expect } = chai;
import { expect } from 'chai';

import app from '../../src/server';
import newProject from '../test-data/new-project.js';
Expand Down
3 changes: 1 addition & 2 deletions tests/test-fixtures/staging-fixtures.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import _ from 'lodash';

import chai from 'chai';
const { expect } = chai;
import { expect } from 'chai';
import supertest from 'supertest';

import app from '../../src/server';
Expand Down
4 changes: 1 addition & 3 deletions tests/test-fixtures/unit-fixtures.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import _ from 'lodash';

import supertest from 'supertest';
import chai from 'chai';
const { expect } = chai;

import { expect } from 'chai';
import app from '../../src/server';
import newUnit from '../test-data/new-unit.js';
import updateUnitJson from '../test-data/update-unit.js';
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/request-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const get = (url) => {
}

resolve(res);

});
});
};

0 comments on commit baed040

Please sign in to comment.