Skip to content

Commit

Permalink
using the new parser for ImportDirective tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Janther committed Dec 11, 2024
1 parent cc49d87 commit 26e7401
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
10 changes: 6 additions & 4 deletions tests/format/ImportDirective/__snapshots__/format.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`ImportDirectives.sol - {"bracketSpacing":true} format 1`] = `
exports[`ImportDirectives.sol - {"bracketSpacing":true,"compiler":"0.8.28"} format 1`] = `
====================================options=====================================
bracketSpacing: true
compiler: "0.8.28"
parsers: ["slang-solidity"]
printWidth: 80
| printWidth
Expand All @@ -28,7 +29,7 @@ import {
================================================================================
`;

exports[`ImportDirectives.sol - {"bracketSpacing":true} format 2`] = `
exports[`ImportDirectives.sol - {"bracketSpacing":true} format 1`] = `
====================================options=====================================
bracketSpacing: true
parsers: ["solidity-parse"]
Expand All @@ -51,8 +52,9 @@ import { symbol1 as alias1, symbol2 as alias2, symbol3 as alias3, symbol4 } from
================================================================================
`;

exports[`ImportDirectives.sol format 1`] = `
exports[`ImportDirectives.sol - {"compiler":"0.8.28"} format 1`] = `
====================================options=====================================
compiler: "0.8.28"
parsers: ["slang-solidity"]
printWidth: 80
| printWidth
Expand All @@ -78,7 +80,7 @@ import {
================================================================================
`;

exports[`ImportDirectives.sol format 2`] = `
exports[`ImportDirectives.sol format 1`] = `
====================================options=====================================
parsers: ["solidity-parse"]
printWidth: 80
Expand Down
7 changes: 5 additions & 2 deletions tests/format/ImportDirective/format.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
runFormatTest(import.meta, ['slang-solidity']);
runFormatTest(import.meta, ['slang-solidity'], { bracketSpacing: true });
runFormatTest(import.meta, ['slang-solidity'], { compiler: '0.8.28' });
runFormatTest(import.meta, ['slang-solidity'], {
bracketSpacing: true,
compiler: '0.8.28'
});
runFormatTest(import.meta, ['solidity-parse']);
runFormatTest(import.meta, ['solidity-parse'], { bracketSpacing: true });

0 comments on commit 26e7401

Please sign in to comment.