Skip to content

Commit

Permalink
Renaming cleanup function
Browse files Browse the repository at this point in the history
  • Loading branch information
r0qs committed Mar 20, 2023
1 parent 8b5a5e7 commit fd73c07
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions test/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import solc from '../';
const dist = path.resolve(__dirname, '..');
const solcjs = path.join(dist, 'solc.js');

function clean () {
function cleanupArtifacts () {
rimraf.sync(`${dist}/*{.bin,.abi}`);
}

Expand Down Expand Up @@ -39,23 +39,23 @@ tape('CLI', function (t) {
spt.stderr.empty();
spt.succeeds();
spt.end();
st.teardown(() => { clean(); });
st.teardown(cleanupArtifacts);
});

t.test('--bin --optimize', function (st) {
const spt = spawn(st, `node ${solcjs} --bin --optimize test/resources/fixtureSmoke.sol`);
spt.stderr.empty();
spt.succeeds();
spt.end();
st.teardown(() => { clean(); });
st.teardown(cleanupArtifacts);
});

t.test('--bin --optimize-runs 666', function (st) {
const spt = spawn(st, `node ${solcjs} --bin --optimize-runs 666 test/resources/fixtureSmoke.sol`);
spt.stderr.empty();
spt.succeeds();
spt.end();
st.teardown(() => { clean(); });
st.teardown(cleanupArtifacts);
});

t.test('--bin --optimize-runs not-a-number', function (st) {
Expand All @@ -81,15 +81,15 @@ tape('CLI', function (t) {
spt.stderr.empty();
spt.succeeds();
spt.end();
st.teardown(() => { clean(); });
st.teardown(cleanupArtifacts);
});

t.test('--bin --abi', function (st) {
const spt = spawn(st, `node ${solcjs} --bin --abi test/resources/fixtureSmoke.sol`);
spt.stderr.empty();
spt.succeeds();
spt.end();
st.teardown(() => { clean(); });
st.teardown(cleanupArtifacts);
});

t.test('no base path', function (st) {
Expand All @@ -103,7 +103,7 @@ tape('CLI', function (t) {
spt.stderr.empty();
spt.succeeds();
spt.end();
st.teardown(() => { clean(); });
st.teardown(cleanupArtifacts);
});

t.test('relative base path', function (st) {
Expand All @@ -120,7 +120,7 @@ tape('CLI', function (t) {
spt.stderr.empty();
spt.succeeds();
spt.end();
st.teardown(() => { clean(); });
st.teardown(cleanupArtifacts);
});

t.test('relative non canonical base path', function (st) {
Expand All @@ -134,7 +134,7 @@ tape('CLI', function (t) {
spt.stderr.empty();
spt.succeeds();
spt.end();
st.teardown(() => { clean(); });
st.teardown(cleanupArtifacts);
});

t.test('absolute base path', function (st) {
Expand All @@ -148,7 +148,7 @@ tape('CLI', function (t) {
spt.stderr.empty();
spt.succeeds();
spt.end();
st.teardown(() => { clean(); });
st.teardown(cleanupArtifacts);
});

t.test('include paths', function (st) {
Expand All @@ -166,7 +166,7 @@ tape('CLI', function (t) {
spt.stderr.empty();
spt.succeeds();
spt.end();
st.teardown(() => { clean(); });
st.teardown(cleanupArtifacts);
});

t.test('include paths without base path', function (st) {
Expand Down

0 comments on commit fd73c07

Please sign in to comment.