mirror of
				https://github.com/valentineus/simple-container.git
				synced 2025-11-04 00:39:44 +03:00 
			
		
		
		
	Changed structure of the test
This commit is contained in:
		@@ -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);
 | 
			
		||||
    });
 | 
			
		||||
});
 | 
			
		||||
		Reference in New Issue
	
	Block a user