update to use better command recognition
This commit is contained in:
44
test/test.ts
44
test/test.ts
@ -21,7 +21,6 @@ let dockerfile1: NpmciBuildDocker.Dockerfile
|
||||
let dockerfile2: NpmciBuildDocker.Dockerfile
|
||||
let sortableArray: NpmciBuildDocker.Dockerfile[]
|
||||
|
||||
|
||||
tap.test('should return valid Dockerfiles', async () => {
|
||||
dockerfile1 = new NpmciBuildDocker.Dockerfile({ filePath: './Dockerfile', read: true })
|
||||
dockerfile2 = new NpmciBuildDocker.Dockerfile({ filePath: './Dockerfile_sometag1', read: true })
|
||||
@ -30,10 +29,10 @@ tap.test('should return valid Dockerfiles', async () => {
|
||||
})
|
||||
|
||||
tap.test('should read a directory of Dockerfiles', async () => {
|
||||
return NpmciBuildDocker.readDockerfiles()
|
||||
return NpmciBuildDocker.readDockerfiles({})
|
||||
.then(async (readDockerfilesArrayArg: NpmciBuildDocker.Dockerfile[]) => {
|
||||
sortableArray = readDockerfilesArrayArg
|
||||
return expect(readDockerfilesArrayArg[ 1 ].version).to.equal('sometag1')
|
||||
return expect(readDockerfilesArrayArg[1].version).to.equal('sometag1')
|
||||
})
|
||||
})
|
||||
|
||||
@ -49,21 +48,42 @@ tap.test('should correctly chain Dockerfile handling', async () => {
|
||||
})
|
||||
|
||||
tap.test('should publish all built Dockerfiles', async () => {
|
||||
return NpmciPublish.publish('docker')
|
||||
return NpmciPublish.publish({
|
||||
_: [
|
||||
'test',
|
||||
'docker'
|
||||
]
|
||||
})
|
||||
})
|
||||
|
||||
tap.test('should source nvm using bash and install a specific node version, then test it', async () => {
|
||||
return NpmciTest.test('legacy')
|
||||
.then(() => {
|
||||
return NpmciTest.test('lts')
|
||||
})
|
||||
.then(() => {
|
||||
return NpmciTest.test('stable')
|
||||
})
|
||||
await NpmciTest.test({
|
||||
_: [
|
||||
'test',
|
||||
'legacy'
|
||||
]
|
||||
})
|
||||
await NpmciTest.test({
|
||||
_: [
|
||||
'test',
|
||||
'lts'
|
||||
]
|
||||
})
|
||||
await NpmciTest.test({
|
||||
_: [
|
||||
'test',
|
||||
'stable'
|
||||
]
|
||||
})
|
||||
})
|
||||
|
||||
tap.test('should test dockerfiles', async () => {
|
||||
return NpmciTest.test('docker')
|
||||
return NpmciTest.test({
|
||||
_: [
|
||||
'test',
|
||||
'docker'
|
||||
]
|
||||
})
|
||||
})
|
||||
|
||||
tap.test('should pick up SSH keys', async () => {
|
||||
|
Reference in New Issue
Block a user