зеркало из https://github.com/electron/electron.git
build: ensure that we bundle the correct version of @types/node (#19102)
This commit is contained in:
Родитель
5a1b661f42
Коммит
4b674c1daf
|
@ -9,7 +9,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@electron/get": "^1.0.1",
|
||||
"@types/node": "^10.12.18",
|
||||
"@types/node": "^12.0.12",
|
||||
"extract-zip": "^1.0.3"
|
||||
},
|
||||
"engines": {
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
import { expect } from 'chai'
|
||||
|
||||
describe('bundled @types/node', () => {
|
||||
it('should match the major version of bundled node', () => {
|
||||
expect(require('../npm/package.json').dependencies).to.have.property('@types/node')
|
||||
const range = require('../npm/package.json').dependencies['@types/node']
|
||||
expect(range).to.match(/^\^.+/, 'should allow any type dep in a major range')
|
||||
expect(range.slice(1).split('.')[0]).to.equal(process.versions.node.split('.')[0])
|
||||
})
|
||||
})
|
Загрузка…
Ссылка в новой задаче