Removed shelljs dev dependency
This commit is contained in:
@@ -49,8 +49,7 @@
|
|||||||
"jasmine-browser-runner": "github:jasmine/jasmine-browser-runner",
|
"jasmine-browser-runner": "github:jasmine/jasmine-browser-runner",
|
||||||
"jsdom": "^26.0.0",
|
"jsdom": "^26.0.0",
|
||||||
"prettier": "1.17.1",
|
"prettier": "1.17.1",
|
||||||
"sass": "^1.58.3",
|
"sass": "^1.58.3"
|
||||||
"shelljs": "^0.9.2"
|
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"Safari >= 15",
|
"Safari >= 15",
|
||||||
|
|||||||
@@ -1,23 +1,21 @@
|
|||||||
const fs = require('node:fs');
|
const fs = require('node:fs');
|
||||||
const path = require('node:path');
|
const path = require('node:path');
|
||||||
const os = require('node:os');
|
const os = require('node:os');
|
||||||
|
const child_process = require('node:child_process');
|
||||||
|
|
||||||
describe('npm package', function() {
|
describe('npm package', function() {
|
||||||
beforeAll(function() {
|
beforeAll(function() {
|
||||||
const shell = require('shelljs'),
|
const packOutput = child_process.execSync('npm pack', {
|
||||||
pack = shell.exec('npm pack', { silent: true });
|
encoding: 'utf8',
|
||||||
|
stdio: ['pipe', 'pipe', 'pipe']
|
||||||
this.tarball = pack.stdout.split('\n')[0];
|
});
|
||||||
|
this.tarball = packOutput.split('\n')[0];
|
||||||
const prefix = path.join(os.tmpdir(), 'jasmine-npm-package');
|
const prefix = path.join(os.tmpdir(), 'jasmine-npm-package');
|
||||||
this.tmpDir = fs.mkdtempSync(prefix);
|
this.tmpDir = fs.mkdtempSync(prefix);
|
||||||
|
|
||||||
const untar = shell.exec(
|
child_process.execSync(`tar -xzf ${this.tarball} -C ${this.tmpDir}`, {
|
||||||
'tar -xzf ' + this.tarball + ' -C ' + this.tmpDir,
|
encoding: 'utf8'
|
||||||
{
|
});
|
||||||
silent: true
|
|
||||||
}
|
|
||||||
);
|
|
||||||
expect(untar.code).toBe(0);
|
|
||||||
|
|
||||||
this.packagedCore = require(path.join(
|
this.packagedCore = require(path.join(
|
||||||
this.tmpDir,
|
this.tmpDir,
|
||||||
@@ -42,7 +40,7 @@ describe('npm package', function() {
|
|||||||
|
|
||||||
afterAll(function() {
|
afterAll(function() {
|
||||||
fs.unlinkSync(this.tarball);
|
fs.unlinkSync(this.tarball);
|
||||||
fs.rmSync(this.tmpDir, {recursive: true});
|
fs.rmSync(this.tmpDir, { recursive: true });
|
||||||
});
|
});
|
||||||
|
|
||||||
it('has a root path', function() {
|
it('has a root path', function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user