Skip to content

Commit 0a3aa0a

Browse files
committed
chore: skip windows build
1 parent 4da04bc commit 0a3aa0a

File tree

1 file changed

+23
-20
lines changed

1 file changed

+23
-20
lines changed

test/build.js

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,43 @@
33

44
const { expect } = require('../utils/chai')
55
const execa = require('execa')
6+
const process = require('process')
67
const { copy, existsSync, readJson } = require('fs-extra')
78
const { join } = require('path')
89
const bin = require.resolve('../')
910
const tempy = require('tempy')
1011

1112
describe('build', () => {
12-
describe('esm', () => {
13-
let projectDir = ''
13+
if (process.platform !== 'win32') {
14+
describe('esm', () => {
15+
let projectDir = ''
1416

15-
before(async () => {
16-
projectDir = tempy.directory()
17+
before(async () => {
18+
projectDir = tempy.directory()
1719

18-
await copy(join(__dirname, 'fixtures', 'esm', 'an-esm-project'), projectDir)
19-
})
20+
await copy(join(__dirname, 'fixtures', 'esm', 'an-esm-project'), projectDir)
21+
})
2022

21-
it('should build an esm project', async function () {
22-
this.timeout(20 * 1000) // slow ci is slow
23+
it('should build an esm project', async function () {
24+
this.timeout(20 * 1000) // slow ci is slow
2325

24-
await execa(bin, ['build'], {
25-
cwd: projectDir
26-
})
26+
await execa(bin, ['build'], {
27+
cwd: projectDir
28+
})
2729

28-
expect(existsSync(join(projectDir, 'dist', 'esm'))).to.be.true()
29-
expect(existsSync(join(projectDir, 'dist', 'cjs'))).to.be.true()
30+
expect(existsSync(join(projectDir, 'dist', 'esm'))).to.be.true()
31+
expect(existsSync(join(projectDir, 'dist', 'cjs'))).to.be.true()
3032

31-
const module = require(join(projectDir, 'dist'))
33+
const module = require(join(projectDir, 'dist'))
3234

33-
expect(module).to.have.property('useHerp').that.is.a('function')
34-
expect(module).to.have.property('useDerp').that.is.a('function')
35+
expect(module).to.have.property('useHerp').that.is.a('function')
36+
expect(module).to.have.property('useDerp').that.is.a('function')
3537

36-
const distPkgPath = join(projectDir, 'dist', 'package.json')
37-
const distPkg = await readJson(distPkgPath)
38+
const distPkgPath = join(projectDir, 'dist', 'package.json')
39+
const distPkg = await readJson(distPkgPath)
3840

39-
expect(distPkg.types.includes('dist')).to.be.false()
41+
expect(distPkg.types.includes('dist')).to.be.false()
42+
})
4043
})
41-
})
44+
}
4245
})

0 commit comments

Comments
 (0)