0
mirror of https://github.com/valentineus/simple-container.git synced 2025-06-03 05:13:34 +03:00

Changed structure of the test

This commit is contained in:
Valentin Popov 2017-10-07 00:53:37 +04:00
parent ad3924b45e
commit 0b1fbd32c0

View File

@ -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) {
done();
}
containers.create(image).then(item => {
container = item;
done();
});
});
after((done) => {
container.stop(() => {
container.remove(() => {
done();
});
});
});
it('simple', () => {
assert.isString(container.id);
});
});