Skip to content

Commit

Permalink
fix: tests using lib prohibited (#2625)
Browse files Browse the repository at this point in the history
Test will always require from `src`.
  • Loading branch information
nbbeeken committed Nov 19, 2020
1 parent 7aa3567 commit 5e04fff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 3 additions & 0 deletions test/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
"jsdoc/require-returns-type": "off",
"jsdoc/valid-types": "off",

// Since we use ts-node we should always require the TS code
"no-restricted-modules": ["error", { "patterns": ["**/../lib/**"] }],

"no-console": "off",
"eqeqeq": ["error", "always", { "null": "ignore" }],
"strict": ["error", "global"],
Expand Down
7 changes: 3 additions & 4 deletions test/functional/sharding_connection.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
'use strict';

const withClient = require('./shared').withClient;
const setupDatabase = require('./shared').setupDatabase;
const expect = require('chai').expect;
const TopologyType = require('../../lib/sdam/common').TopologyType;
const { withClient, setupDatabase } = require('./shared');
const { expect } = require('chai');
const { TopologyType } = require('../../src/sdam/common');

describe('Sharding (Connection)', function () {
before(function () {
Expand Down

0 comments on commit 5e04fff

Please sign in to comment.