@applitools/docker-compose-mocha
Advanced tools
Comparing version 1.2.8 to 1.2.9
// @flow | ||
function extractTimestampFromName(containerName/* : string */, divider/* : string */) { | ||
return Number(containerName.split('_')[0].split(divider)[1]); | ||
return Number(containerName.split('_')[1].split(divider)[1]); | ||
} | ||
module.exports = extractTimestampFromName; |
{ | ||
"name": "@applitools/docker-compose-mocha", | ||
"version": "1.2.8", | ||
"version": "1.2.9", | ||
"description": "Tool used for setting up an isolated environment for end to end testing / integration testing using Docker Compose", | ||
@@ -33,3 +33,3 @@ "main": "index.js", | ||
"eslint-config-airbnb-base": "^11.1.3", | ||
"eslint-plugin-import": "^2.15.0", | ||
"eslint-plugin-import": "^2.16.0", | ||
"flow-bin": "^0.37.4", | ||
@@ -36,0 +36,0 @@ "mocha": "^5.2.0", |
@@ -9,5 +9,5 @@ | ||
it('should extract the unix timestamp from the container name', () => { | ||
const input = '233dfb33b22f cicontainerlodloutrinzzdivzz1481723893_dct_s1_1'; | ||
expect(extractTimestampFromName(input, divider)).to.equal(1481723893); | ||
const input = 'ce2366ff75c5 cicontaineryaniv_barelzzdivzz1549961204_screenshot-webhook_1'; | ||
expect(extractTimestampFromName(input, divider)).to.equal(1549961204); | ||
}); | ||
}); |
49591