Skip to content

Commit fde4ede

Browse files
committed
style(tests): format test via prettier
Signed-off-by: Mike Fiedler <[email protected]>
1 parent 4caba99 commit fde4ede

File tree

1 file changed

+25
-33
lines changed

1 file changed

+25
-33
lines changed

test.js

Lines changed: 25 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,11 @@ test('py3.6 packages have the same hash', t => {
140140
sls(['package']);
141141
const fileHash = sha256File('.serverless/sls-py-req-test.zip');
142142
sls(['package']);
143-
t.equal(sha256File('.serverless/sls-py-req-test.zip'), fileHash, 'packages have the same hash');
143+
t.equal(
144+
sha256File('.serverless/sls-py-req-test.zip'),
145+
fileHash,
146+
'packages have the same hash'
147+
);
144148
t.end();
145149
});
146150

@@ -271,10 +275,7 @@ test(
271275

272276
const zipfiles = listZipFiles('.serverless/sls-py-req-test.zip');
273277
t.true(zipfiles.includes(`flask${sep}__init__.py`), 'flask is packaged');
274-
t.true(
275-
zipfiles.includes(`boto3${sep}__init__.py`),
276-
'boto3 is packaged'
277-
);
278+
t.true(zipfiles.includes(`boto3${sep}__init__.py`), 'boto3 is packaged');
278279
t.end();
279280
},
280281
{ skip: !canUseDocker() }
@@ -652,7 +653,10 @@ test('pipenv py3.6 can package flask with default options', t => {
652653
const zipfiles = listZipFiles('.serverless/sls-py-req-test.zip');
653654
t.true(zipfiles.includes(`flask${sep}__init__.py`), 'flask is packaged');
654655
t.true(zipfiles.includes(`boto3${sep}__init__.py`), 'boto3 is packaged');
655-
t.false(zipfiles.includes(`pytest${sep}__init__.py`), 'dev-package pytest is NOT packaged');
656+
t.false(
657+
zipfiles.includes(`pytest${sep}__init__.py`),
658+
'dev-package pytest is NOT packaged'
659+
);
656660
t.end();
657661
});
658662

@@ -1617,8 +1621,11 @@ test(
16171621
'foobar has retained its executable file permissions'
16181622
);
16191623

1620-
const zipfiles_hello2 = listZipFilesWithMetaData('.serverless/module2-sls-py-req-test-indiv-dev-hello2.zip');
1621-
const flaskPerm = statSync('.serverless/module2/requirements/bin/flask').mode;
1624+
const zipfiles_hello2 = listZipFilesWithMetaData(
1625+
'.serverless/module2-sls-py-req-test-indiv-dev-hello2.zip'
1626+
);
1627+
const flaskPerm = statSync('.serverless/module2/requirements/bin/flask')
1628+
.mode;
16221629

16231630
t.true(
16241631
zipfiles_hello2['bin/flask'].unixPermissions === flaskPerm,
@@ -1651,8 +1658,11 @@ test(
16511658
'foobar has retained its executable file permissions'
16521659
);
16531660

1654-
const zipfiles_hello2 = listZipFilesWithMetaData('.serverless/module2-sls-py-req-test-indiv-dev-hello2.zip');
1655-
const flaskPerm = statSync('.serverless/module2/requirements/bin/flask').mode;
1661+
const zipfiles_hello2 = listZipFilesWithMetaData(
1662+
'.serverless/module2-sls-py-req-test-indiv-dev-hello2.zip'
1663+
);
1664+
const flaskPerm = statSync('.serverless/module2/requirements/bin/flask')
1665+
.mode;
16561666

16571667
t.true(
16581668
zipfiles_hello2['bin/flask'].unixPermissions === flaskPerm,
@@ -1681,10 +1691,7 @@ test('py3.6 uses download cache by defaul option', t => {
16811691
process.chdir('tests/base');
16821692
const path = npm(['pack', '../..']);
16831693
npm(['i', path]);
1684-
sls([
1685-
'--cacheLocation=.requirements-cache',
1686-
'package'
1687-
]);
1694+
sls(['--cacheLocation=.requirements-cache', 'package']);
16881695
t.true(
16891696
pathExistsSync(`.requirements-cache${sep}downloadCacheslspyc${sep}http`),
16901697
'cache directoy exists'
@@ -1753,10 +1760,7 @@ test(
17531760
process.chdir('tests/base');
17541761
const path = npm(['pack', '../..']);
17551762
npm(['i', path]);
1756-
sls([
1757-
'--dockerizePip=true',
1758-
'package'
1759-
]);
1763+
sls(['--dockerizePip=true', 'package']);
17601764
const cachepath = getUserCachePath();
17611765
const cacheFolderHash = sha256Path('.serverless/requirements.txt');
17621766
t.true(
@@ -1832,11 +1836,7 @@ test(
18321836
process.chdir('tests/base');
18331837
const path = npm(['pack', '../..']);
18341838
npm(['i', path]);
1835-
sls([
1836-
'--dockerizePip=true',
1837-
'--slim=true',
1838-
'package'
1839-
]);
1839+
sls(['--dockerizePip=true', '--slim=true', 'package']);
18401840
const cachepath = getUserCachePath();
18411841
const cacheFolderHash = sha256Path('.serverless/requirements.txt');
18421842
t.true(
@@ -1855,11 +1855,7 @@ test(
18551855
`${cachepath}${sep}${cacheFolderHash}_slspyc${sep}injected_file_is_bad_form`,
18561856
'injected new file into static cache folder'
18571857
);
1858-
sls([
1859-
'--dockerizePip=true',
1860-
'--slim=true',
1861-
'package'
1862-
]);
1858+
sls(['--dockerizePip=true', '--slim=true', 'package']);
18631859

18641860
const zipfiles = listZipFiles('.serverless/sls-py-req-test.zip');
18651861
t.true(
@@ -1883,11 +1879,7 @@ test(
18831879
process.chdir('tests/base');
18841880
const path = npm(['pack', '../..']);
18851881
npm(['i', path]);
1886-
sls([
1887-
'--dockerizePip=true',
1888-
'--slim=true',
1889-
'package'
1890-
]);
1882+
sls(['--dockerizePip=true', '--slim=true', 'package']);
18911883
const cachepath = getUserCachePath();
18921884
t.true(
18931885
pathExistsSync(`${cachepath}${sep}downloadCacheslspyc${sep}http`),

0 commit comments

Comments
 (0)