diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/tests/index.js | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/tests/index.js b/src/tests/index.js index 7a85db3..176d192 100644 --- a/src/tests/index.js +++ b/src/tests/index.js @@ -3,14 +3,27 @@ import { assert } from 'chai'; import Containers from '../lib/index'; describe('simple-container:', () => { - it('simple', (done) => { + var container = null; + + before((done) => { var containers = new Containers(); var image = 'hello-world:latest'; - containers.create(image).then(container => { - if (container) { + containers.create(image).then(item => { + container = item; + done(); + }); + }); + + after((done) => { + container.stop(() => { + container.remove(() => { done(); - } + }); }); }); + + it('simple', () => { + assert.isString(container.id); + }); });
\ No newline at end of file |