Skip to content

Commit 3246b90

Browse files
author
sam
committed
test(jest): additional jest plugins
add two additional plugins for exhaustive testing
1 parent 9c0174e commit 3246b90

4 files changed

Lines changed: 124 additions & 37 deletions

File tree

package-lock.json

Lines changed: 116 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"test": "npx jest",
1616
"test:jest": "npx jest -u",
1717
"test:prettier": "npx prettier --loglevel debug --config src/index.js --write tests/*.sol",
18+
"test:full": "FULL_TEST=1 npx jest",
1819
"codecov": "npx codecov",
1920
"lint": "npx eslint . --fix",
2021
"lint:format": "npx prettier --loglevel debug --write ."
@@ -51,6 +52,8 @@
5152
"jest": "^26.6.3",
5253
"jest-mock-now": "1.3.0",
5354
"jest-snapshot-generate": "1.0.0",
55+
"jest-snapshot-serializer-ansi": "^1.0.0",
56+
"jest-snapshot-serializer-raw": "^1.1.0",
5457
"jest-watch-typeahead": "0.6.1",
5558
"prettier": "2.2.1",
5659
"prettier-plugin-solidity": "1.0.0-beta.6",

scripts/generateIndexes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if (process.env.SCRIPT === 'true') {
66
prettier.resolveConfig(`${__dirname}../.prettierrc`).then((options) => {
77
// eslint-disable-next-line no-param-reassign
88
options.parser = 'babel';
9-
['../src/nodes', '../src/binary-operator-printers'].forEach((dir) => {
9+
['../src'].forEach((dir) => {
1010
fs.writeFileSync(
1111
`${__dirname}/${dir}/index.js`,
1212
prettier.format(makeData(dir), options)

src/index.js

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,5 @@
1-
/**
2-
* @file Prettier configuration for Solidity
3-
* @version 1.1.0
4-
* @summary base config adapted from AirBNB to reduce diff churn
5-
* @overrides solidity settings from Solidity Documentation
6-
* @note `printWidth` is not a line character capture
7-
* @dev `explicitTypes`
8-
*/
1+
/* This file was automatically generated on 1617246628.985 */
92

10-
module.exports = {
11-
arrowParens: 'always',
12-
bracketSpacing: true,
13-
jsxBracketSameLine: false,
14-
jsxSingleQuote: false,
15-
endOfLine: 'lf',
16-
printWidth: 80,
17-
singleQuote: true,
18-
tabWidth: 2,
19-
trailingComma: 'all',
20-
quoteProps: 'as-needed',
21-
proseWrap: 'always',
22-
semi: true,
23-
overrides: [
24-
{
25-
files: '*.sol',
26-
options: {
27-
printWidth: 80,
28-
tabWidth: 4,
29-
useTabs: false,
30-
singleQuote: false,
31-
bracketSpacing: true,
32-
explicitTypes: 'always',
33-
},
34-
},
35-
],
36-
};
37-
/** @exports prettier-config-solidity */
3+
/* eslint-disable global-require */
4+
5+
module.exports = {};

0 commit comments

Comments
 (0)