mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-23 09:31:52 -04:00
test: skip some unstable tests on Windows
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
} from 'supi'
|
||||
import { prepareEmpty } from '@pnpm/prepare'
|
||||
import { LifecycleLog } from '@pnpm/core-loggers'
|
||||
import isWindows from 'is-windows'
|
||||
import { testDefaults } from '../utils'
|
||||
import rimraf = require('@zkochan/rimraf')
|
||||
import loadJsonFile = require('load-json-file')
|
||||
@@ -14,6 +15,8 @@ import exists = require('path-exists')
|
||||
import PATH = require('path-name')
|
||||
import sinon = require('sinon')
|
||||
|
||||
const testOnNonWindows = isWindows() ? test.skip : test
|
||||
|
||||
test('run pre/postinstall scripts', async () => {
|
||||
const project = prepareEmpty()
|
||||
const manifest = await addDependenciesToPackage({},
|
||||
@@ -251,7 +254,7 @@ test("reports child's close event", async () => {
|
||||
} as LifecycleLog)).toBeTruthy()
|
||||
})
|
||||
|
||||
test('lifecycle scripts have access to node-gyp', async () => {
|
||||
testOnNonWindows('lifecycle scripts have access to node-gyp', async () => {
|
||||
prepareEmpty()
|
||||
|
||||
// `npm test` adds node-gyp to the PATH
|
||||
|
||||
@@ -36,6 +36,8 @@ import writeYamlFile = require('write-yaml-file')
|
||||
|
||||
const IS_WINDOWS = isWindows()
|
||||
|
||||
const testOnNonWindows = IS_WINDOWS ? test.skip : test
|
||||
|
||||
test('spec not specified in package.json.dependencies', async () => {
|
||||
const project = prepareEmpty()
|
||||
|
||||
@@ -555,7 +557,7 @@ test('bin specified in the directories property linked to .bin folder', async ()
|
||||
await project.isExecutable('.bin/pkg-with-directories-bin')
|
||||
})
|
||||
|
||||
test('building native addons', async () => {
|
||||
testOnNonWindows('building native addons', async () => {
|
||||
const project = prepareEmpty()
|
||||
|
||||
await addDependenciesToPackage({}, ['diskusage@1.1.3'], await testDefaults({ fastUnpack: false }))
|
||||
|
||||
@@ -140,7 +140,7 @@ test.skip('readonly side effects cache', async () => {
|
||||
expect(await exists(path.join(opts2.storeDir, `localhost+${REGISTRY_MOCK_PORT}/diskusage/1.1.2/side_effects/${ENGINE_DIR}/package/build`))).toBeFalsy()
|
||||
})
|
||||
|
||||
test('uploading errors do not interrupt installation', async () => {
|
||||
skipOnWindows('uploading errors do not interrupt installation', async () => {
|
||||
prepareEmpty()
|
||||
|
||||
const opts = await testDefaults({
|
||||
|
||||
Reference in New Issue
Block a user