From 51db80f04cee1e08e531f5271415956908f46740 Mon Sep 17 00:00:00 2001 From: matt Date: Mon, 24 Jan 2022 09:44:48 +0000 Subject: [PATCH] Auto use jest-extended matchers in tests --- jest.config.js | 5 ++++- lib/__tests__/importJSON.test.js | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jest.config.js b/jest.config.js index 829ab7a..d284753 100644 --- a/jest.config.js +++ b/jest.config.js @@ -7,5 +7,8 @@ module.exports = { clearMocks: true, collectCoverage: true, coverageDirectory: 'coverage', - coverageProvider: 'v8' + coverageProvider: 'v8', + setupFilesAfterEnv: [ + 'jest-extended/all' + ] }; diff --git a/lib/__tests__/importJSON.test.js b/lib/__tests__/importJSON.test.js index 76a8287..af97911 100644 --- a/lib/__tests__/importJSON.test.js +++ b/lib/__tests__/importJSON.test.js @@ -1,11 +1,8 @@ 'use strict'; const importJSON = require('../importJSON'); -const matchers = require('jest-extended'); const fs = require('fs'); -expect.extend(matchers); - describe('importJSON', () => { test('Import a file from config dir if no dir param given', () => { const loadedFile = importJSON('db.sample');