Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oojacoboo committed Oct 12, 2023
1 parent bc57d69 commit 95a67a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/lib/index.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';

const fs = require('fs');
const path = require('path');

const {
Expand Down Expand Up @@ -44,6 +45,8 @@ console.log = jest.fn();
// Tests
describe('createConfigFile', () => {
it('should return the contents of our sample config with passed env variable', async () => {
jest.spyOn(fs, 'readFileSync').mockReturnValue(`{}`);

const { file, contents } = await createDefaultConfigFile('TEST_ENV_VAR');

expect(path.basename(file)).toEqual('.zapiergraphql');
Expand Down

0 comments on commit 95a67a2

Please sign in to comment.