Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Commit

Permalink
HARP-15180 Upgrading yeoman because it has a transitive dependency (a…
Browse files Browse the repository at this point in the history
…xios) which is out of date

Signed-off-by: Jonathan Stichbury <2533428+nzjony@users.noreply.github.com>
  • Loading branch information
nzjony committed May 20, 2021
1 parent 5356f02 commit 0c9dad5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
5 changes: 3 additions & 2 deletions @here/generator-harp.gl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@
],
"dependencies": {
"mkdirp": "^1.0.4",
"yeoman-generator": "^4.10.1"
"yeoman-generator": "^5.2.0"
},
"devDependencies": {
"chai": "^4.2.0",
"fs.extra": "^1.3.2",
"mocha": "^8.2.1",
"yeoman-test": "^2.6.0"
"yeoman-environment": "^3.4.0",
"yeoman-test": "^6.1.0"
},
"publishConfig": {
"access": "public"
Expand Down
23 changes: 10 additions & 13 deletions @here/generator-harp.gl/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@ const fs = require("fs");
const fsExtra = require("fs.extra");
const path = require("path");
const yeomanTestHelpers = require("yeoman-test");
const {
assert
} = require("chai");
const {
spawnSync
} = require('child_process');
const { assert } = require("chai");
const { spawnSync } = require("child_process");

/*
Expand All @@ -17,34 +13,35 @@ const {
*/
describe("harp.gl:app", function () {

this.timeout(300000);

let helperDirectory;

before(async function () {
helperDirectory = await yeomanTestHelpers.run(path.join(__dirname, '../generators/app'))
helperDirectory = await yeomanTestHelpers
.run(path.join(__dirname, "../generators/app"))
.inTmpDir(function (dir) {
if (process.env.USE_NPMRC) {
const targetPath = path.join(dir, ".npmrc");
fs.copyFileSync(process.env.USE_NPMRC, targetPath);
}
})
.withPrompts({
'access_token': 'test_token'
language: "typescript",
apikey: "test_token"
});

assert.isString(helperDirectory);
assert.isString(helperDirectory.cwd);
});

it("webpack", async function () {
const installStatus = spawnSync("npm", ["install"], {
cwd: helperDirectory
cwd: helperDirectory.cwd
});
assert.strictEqual(installStatus.status, 0, installStatus.output);

const buildStatus = spawnSync("npm", ["run", "build"], {
cwd: helperDirectory
cwd: helperDirectory.cwd
});
assert.strictEqual(buildStatus.status, 0, buildStatus.output);
});
Expand All @@ -53,7 +50,7 @@ describe("harp.gl:app", function () {
if (process.env.KEEP_TEMP_DIR) {
console.log("Keeping", helperDirectory);
} else {
fsExtra.rmrfSync(helperDirectory);
fsExtra.rmrfSync(helperDirectory.cwd);
}
});
});

0 comments on commit 0c9dad5

Please sign in to comment.