mirror of
https://github.com/valentineus/simple-container.git
synced 2025-06-05 05:23:35 +03:00
Changed structure of the test
This commit is contained in:
parent
ad3924b45e
commit
0b1fbd32c0
@ -3,14 +3,27 @@ import { assert } from 'chai';
|
|||||||
import Containers from '../lib/index';
|
import Containers from '../lib/index';
|
||||||
|
|
||||||
describe('simple-container:', () => {
|
describe('simple-container:', () => {
|
||||||
it('simple', (done) => {
|
var container = null;
|
||||||
|
|
||||||
|
before((done) => {
|
||||||
var containers = new Containers();
|
var containers = new Containers();
|
||||||
var image = 'hello-world:latest';
|
var image = 'hello-world:latest';
|
||||||
|
|
||||||
containers.create(image).then(container => {
|
containers.create(image).then(item => {
|
||||||
if (container) {
|
container = item;
|
||||||
done();
|
done();
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
after((done) => {
|
||||||
|
container.stop(() => {
|
||||||
|
container.remove(() => {
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('simple', () => {
|
||||||
|
assert.isString(container.id);
|
||||||
|
});
|
||||||
});
|
});
|
Loading…
x
Reference in New Issue
Block a user