Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
moroine committed Mar 15, 2022
1 parent f49bcc9 commit f52bb30
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/e2e/e2e.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ chai.use(require('sinon-chai'));
const expect = chai.expect;

const slsVersion = semver.parse(pkg.dependencies.serverless);
const slsMajor = slsVersion ? slsVersion.major : 3;
const nodeVersion = semver.parse(process.version);

async function unzipArtefacts(archivePath) {
Expand Down Expand Up @@ -55,7 +56,7 @@ async function unzipArtefacts(archivePath) {

describe('end-to-end testing', () => {
it('should support include-external-npm-packages example', async function () {
if (nodeVersion.major < 12 || slsVersion.major !== 3) {
if (nodeVersion.major < 12 || slsMajor !== 3) {
// Serverless v3 doesn't support node 10
this.skip();
}
Expand Down Expand Up @@ -83,7 +84,7 @@ describe('end-to-end testing', () => {

it('should support include-external-npm-packages-lock-file example', async function () {
// lock-file v2 is supported by Node16+
if (nodeVersion.major < 16 || slsVersion.major !== 3) {
if (nodeVersion.major < 16 || slsMajor !== 3) {
this.skip();
}

Expand Down

0 comments on commit f52bb30

Please sign in to comment.