techdocs-common: fix tests for the new generator API

This commit is contained in:
Himanshu Mishra
2021-01-11 23:08:30 +01:00
parent f7ecdbb397
commit 078987e251
@@ -80,14 +80,14 @@ describe('helpers', () => {
const imageName = 'spotify/techdocs';
const args = ['build', '-d', '/result'];
const docsDir = os.tmpdir();
const resultDir = os.tmpdir();
const outputDir = os.tmpdir();
it('should pull the techdocs docker container', async () => {
await runDockerContainer({
imageName,
args,
docsDir,
resultDir,
outputDir,
dockerClient: mockDocker,
});
@@ -103,7 +103,7 @@ describe('helpers', () => {
imageName,
args,
docsDir,
resultDir,
outputDir,
dockerClient: mockDocker,
});
@@ -118,7 +118,7 @@ describe('helpers', () => {
},
WorkingDir: '/content',
HostConfig: {
Binds: [`${docsDir}:/content`, `${resultDir}:/result`],
Binds: [`${docsDir}:/content`, `${outputDir}:/result`],
},
},
);
@@ -129,7 +129,7 @@ describe('helpers', () => {
imageName,
args,
docsDir,
resultDir,
outputDir,
dockerClient: mockDocker,
});
@@ -151,7 +151,7 @@ describe('helpers', () => {
imageName,
args,
docsDir,
resultDir,
outputDir,
dockerClient: mockDocker,
}),
).rejects.toThrow(new RegExp(`.+: ${dockerError}`));