Run docker from javascript

This commit is contained in:
Webber
2019-12-22 15:05:15 +01:00
committed by Webber Takken
parent 9a639e97e3
commit 2ab738c083
19 changed files with 1013 additions and 181 deletions

20
src/model/action.test.js Normal file
View File

@@ -0,0 +1,20 @@
import path from 'path';
import Action from './action';
describe('Action', () => {
describe('compatibility check', () => {
it('throws for anything other than linux', () => {
if (process.platform !== 'linux') {
expect(() => Action.checkCompatibility()).toThrow();
} else {
expect(() => Action.checkCompatibility()).not.toThrow();
}
});
});
it('returns the root folder of the action', () => {
const { rootFolder, name } = Action;
expect(path.basename(rootFolder)).toStrictEqual(name);
});
});