Skip to content

Commit

Permalink
refactor: Replace fse.promises.realpath with fs.promises.realpath
Browse files Browse the repository at this point in the history
  • Loading branch information
sdas13 committed Jan 29, 2021
1 parent e0bc57a commit f5174ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/unit/lib/cli/resolve-local-serverless-path.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const { expect } = require('chai');
const path = require('path');
const os = require('os');
const fs = require('fs');
const fse = require('fs-extra');
const resolveLocalServerless = require('../../../../lib/cli/resolve-local-serverless-path');

Expand All @@ -13,10 +14,10 @@ describe('test/unit/lib/cli/resolve-local-serverless.test.js', () => {
it('should resolve with `null` when no local installation is found', async () => {
resolveLocalServerless.delete();
const tmpServerlessPath = path.resolve(
await fse.promises.realpath(os.homedir()),
await fs.promises.realpath(os.homedir()),
'node_modules/serverless.js'
);
await fse.ensureFile(tmpServerlessPath);
expect(await fse.promises.realpath(await resolveLocalServerless())).to.equal(tmpServerlessPath);
expect(await fs.promises.realpath(await resolveLocalServerless())).to.equal(tmpServerlessPath);
});
});

0 comments on commit f5174ff

Please sign in to comment.