diff options
author | Valentin Popov <info@valentineus.link> | 2017-10-06 23:53:37 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2017-10-06 23:53:37 +0300 |
commit | 0b1fbd32c0c2b44cbc494b523c00cb0b9bf8aedd (patch) | |
tree | 7ea9f1bd423650df46fd02750165ce889813bf10 | |
parent | ad3924b45e5618f8350f4f24c19dadb5926e3e42 (diff) | |
download | simple-container-0b1fbd32c0c2b44cbc494b523c00cb0b9bf8aedd.tar.xz simple-container-0b1fbd32c0c2b44cbc494b523c00cb0b9bf8aedd.zip |
Changed structure of the test
-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 |