Skip to content

Commit 0ad70e1

Browse files
axicLeonardo Alt
authored andcommitted
Do not fail unit tests if network is not available
1 parent d0ea309 commit 0ad70e1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/package.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,9 +531,14 @@ tape('Compilation', function (t) {
531531
tape('Loading Legacy Versions', function (t) {
532532
t.test('loading remote version - development snapshot', function (st) {
533533
// getting the development snapshot
534-
st.plan(3);
534+
st.plan(2);
535535
solc.loadRemoteVersion('latest', function (err, solcSnapshot) {
536-
st.notOk(err);
536+
if (err) {
537+
st.plan(1);
538+
st.skip('Network error - skipping remote loading test');
539+
st.end();
540+
return;
541+
}
537542
var output = solcSnapshot.compile('contract x { function g() public {} }');
538543
st.ok(':x' in output.contracts);
539544
st.ok(output.contracts[':x'].bytecode.length > 0);

0 commit comments

Comments
 (0)