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';
 | 
					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();
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    after((done) => {
 | 
				
			||||||
 | 
					        container.stop(() => {
 | 
				
			||||||
 | 
					            container.remove(() => {
 | 
				
			||||||
                done();
 | 
					                done();
 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    it('simple', () => {
 | 
				
			||||||
 | 
					        assert.isString(container.id);
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
		Reference in New Issue
	
	Block a user