Skip to content

Commit

Permalink
Import 'fs/promises' in Node integration test
Browse files Browse the repository at this point in the history
Nicer than accessing fs.promises afterwards. Part of #25.
  • Loading branch information
lucaswerkmeister committed Jun 10, 2023
1 parent d0d45d3 commit a8d299b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/integration/node.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import NodeSession, { set } from '../../node.js';
import { expect } from 'chai';
import fs from 'fs';
import fs from 'fs/promises';
import process from 'process';

const userAgent = 'm3api-integration-tests (https://github.com/lucaswerkmeister/m3api/)';
Expand All @@ -21,7 +21,7 @@ describe( 'NodeSession', function () {
if ( !mediawikiUsername || !mediawikiPassword ) {
let envFile;
try {
envFile = await fs.promises.readFile( '.env', { encoding: 'utf8' } );
envFile = await fs.readFile( '.env', { encoding: 'utf8' } );
} catch ( e ) {
if ( e.code === 'ENOENT' ) {
return;
Expand Down

0 comments on commit a8d299b

Please sign in to comment.