resizer-store
Advanced tools
Comparing version 1.0.3 to 1.0.4
const chai = require('chai'); | ||
const bddStdin = require('bdd-stdin') | ||
const bddStdin = require('bdd-stdin'); | ||
const resizer = require('../lib'); | ||
@@ -8,11 +8,79 @@ | ||
describe('CLI user interactions', () => { | ||
it('Select Icon Size', (done) => { | ||
it('Select Icon 512 x 512', done => { | ||
bddStdin(bddStdin.keys.down, '\n'); | ||
resizer.askAndReturnWhichSize() | ||
.then(data => { | ||
assert.equal(data.width, 512); | ||
assert.equal(data.height, 512); | ||
done(); | ||
}) | ||
resizer.askAndReturnWhichSize().then(data => { | ||
assert.equal(data.width, 512); | ||
assert.equal(data.height, 512); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
it('Select Iphone 6.5"', done => { | ||
bddStdin(bddStdin.keys.down, bddStdin.keys.down, '\n'); | ||
resizer.askAndReturnWhichSize().then(data => { | ||
assert.equal(data.width, 1242); | ||
assert.equal(data.height, 2688); | ||
done(); | ||
}); | ||
}); | ||
it('Select Iphone 5.5"', done => { | ||
bddStdin(bddStdin.keys.down, bddStdin.keys.down, bddStdin.keys.down, '\n'); | ||
resizer.askAndReturnWhichSize().then(data => { | ||
assert.equal(data.width, 1242); | ||
assert.equal(data.height, 2208); | ||
done(); | ||
}); | ||
}); | ||
it('Select iPad', done => { | ||
bddStdin( | ||
bddStdin.keys.down, | ||
bddStdin.keys.down, | ||
bddStdin.keys.down, | ||
bddStdin.keys.down, | ||
'\n', | ||
); | ||
resizer.askAndReturnWhichSize().then(data => { | ||
assert.equal(data.width, 2048); | ||
assert.equal(data.height, 2732); | ||
done(); | ||
}); | ||
}); | ||
it('Select Android Smartphone', done => { | ||
bddStdin( | ||
bddStdin.keys.down, | ||
bddStdin.keys.down, | ||
bddStdin.keys.down, | ||
bddStdin.keys.down, | ||
bddStdin.keys.down, | ||
'\n', | ||
); | ||
resizer.askAndReturnWhichSize().then(data => { | ||
assert.equal(data.width, 1487); | ||
assert.equal(data.height, 2644); | ||
done(); | ||
}); | ||
}); | ||
it('Select Android Smartphone', done => { | ||
bddStdin( | ||
bddStdin.keys.down, | ||
bddStdin.keys.down, | ||
bddStdin.keys.down, | ||
bddStdin.keys.down, | ||
bddStdin.keys.down, | ||
bddStdin.keys.down, | ||
'\n', | ||
); | ||
resizer.askAndReturnWhichSize().then(data => { | ||
assert.equal(data.width, 2048); | ||
assert.equal(data.height, 2732); | ||
done(); | ||
}); | ||
}); | ||
describe('Resize Image Preview', () => { | ||
}); | ||
}); |
@@ -11,5 +11,5 @@ #!/usr/bin/env node | ||
askAndReturnWhichSize() | ||
.then(createCopyDir) | ||
.then(askCustomWidthAndHeight) | ||
.then(askAndReturnImages) | ||
.then(createCopyDir) | ||
.then(resizeAndRemoveAlphaChannel); |
@@ -5,5 +5,5 @@ module.exports = { | ||
{ title: 'Icon 512 x 512', value: { width: 512, height: 512 } }, | ||
{ title: 'IPhone 6.5" 1242 x 2688', value: { width: 1242, height: 2688 } }, | ||
{ title: 'IPhone 5.5" 1242 x 2208', value: { width: 1242, height: 2208 } }, | ||
{ title: 'IPad 2048 x 2732', value: { width: 2048, height: 2732 } }, | ||
{ title: 'iPhone 6.5" 1242 x 2688', value: { width: 1242, height: 2688 } }, | ||
{ title: 'iPhone 5.5" 1242 x 2208', value: { width: 1242, height: 2208 } }, | ||
{ title: 'iPad 2048 x 2732', value: { width: 2048, height: 2732 } }, | ||
{ title: 'Android Smartphone 1487 x 2644', value: { width: 1487, height: 2644 } }, | ||
@@ -10,0 +10,0 @@ { title: 'Android Tablet 2048 x 2732', value: { width: 2048, height: 2732 } }, |
@@ -62,4 +62,4 @@ const prompts = require('prompts'); | ||
sizes = { | ||
width: responseCustomWidth.width, | ||
height: responseCustomHeight.height | ||
width: Number(responseCustomWidth.width), | ||
height: Number(responseCustomHeight.height) | ||
} | ||
@@ -66,0 +66,0 @@ |
{ | ||
"name": "resizer-store", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"main": "./lib/index.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -22,15 +22,16 @@ # Image Resizer for App Store | ||
## Supported sizes | ||
- Icon 512 x 512 | ||
- IOS | ||
- Icon 512 x 512 | ||
- IPhone 6.5" 1242 x 2688 | ||
- IPhone 5.5" 1125 x 2436 | ||
- IPad 2048 x 2732 | ||
- iPhone 6.5" 1242 x 2688 | ||
- iPhone 5.5" 1242 x 2208 | ||
- iPad 2048 x 2732 | ||
- Android | ||
- Smartphone 1487 x 2644 | ||
- Tablet 2048 x 2732 | ||
### Android not supported yet | ||
## Next steps | ||
- Eslint | ||
- Functional Tests | ||
- Support for android size | ||
- Bug, when close the terminal in the first question, the second question shows up | ||
- Bug, when close the terminal in the first question, the second question shows up |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
373327
208
37