Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
292ef6ea
Commit
292ef6ea
authored
Jul 17, 2023
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lint: fix
parent
e32c90fc
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
41 deletions
+41
-41
preimageoracle_more.go
op-bindings/bindings/preimageoracle_more.go
+1
-1
forge-test-names.ts
packages/contracts-bedrock/scripts/forge-test-names.ts
+40
-40
No files found.
op-bindings/bindings/preimageoracle_more.go
View file @
292ef6ea
This diff is collapsed.
Click to expand it.
packages/contracts-bedrock/scripts/forge-test-names.ts
View file @
292ef6ea
...
...
@@ -9,51 +9,51 @@ const checks: Array<{
check
:
(
parts
:
string
[])
=>
boolean
error
:
string
}
>
=
[
{
error
:
'
test name parts should be in camelCase
'
,
check
:
(
parts
:
string
[]):
boolean
=>
{
return
parts
.
every
((
part
)
=>
{
return
part
[
0
]
===
part
[
0
].
toLowerCase
()
})
},
{
error
:
'
test name parts should be in camelCase
'
,
check
:
(
parts
:
string
[]):
boolean
=>
{
return
parts
.
every
((
part
)
=>
{
return
part
[
0
]
===
part
[
0
].
toLowerCase
()
})
},
{
error
:
'
test names should have either 3 or 4 parts, each separated by underscores
'
,
check
:
(
parts
:
string
[]):
boolean
=>
{
return
parts
.
length
===
3
||
parts
.
length
===
4
},
},
{
error
:
'
test names should have either 3 or 4 parts, each separated by underscores
'
,
check
:
(
parts
:
string
[]):
boolean
=>
{
return
parts
.
length
===
3
||
parts
.
length
===
4
},
{
error
:
'
test names should begin with "test", "testFuzz", or "testDiff"
'
,
check
:
(
parts
:
string
[]):
boolean
=>
{
return
[
'
test
'
,
'
testFuzz
'
,
'
testDiff
'
].
includes
(
parts
[
0
])
},
},
{
error
:
'
test names should begin with "test", "testFuzz", or "testDiff"
'
,
check
:
(
parts
:
string
[]):
boolean
=>
{
return
[
'
test
'
,
'
testFuzz
'
,
'
testDiff
'
].
includes
(
parts
[
0
])
},
{
error
:
'
test names should end with either "succeeds", "reverts", "fails", "works" or "benchmark[_num]"
'
,
check
:
(
parts
:
string
[]):
boolean
=>
{
return
(
[
'
succeeds
'
,
'
reverts
'
,
'
fails
'
,
'
benchmark
'
,
'
works
'
].
includes
(
parts
[
parts
.
length
-
1
]
)
||
(
parts
[
parts
.
length
-
2
]
===
'
benchmark
'
&&
!
isNaN
(
parseInt
(
parts
[
parts
.
length
-
1
],
10
)))
)
},
},
{
error
:
'
test names should end with either "succeeds", "reverts", "fails", "works" or "benchmark[_num]"
'
,
check
:
(
parts
:
string
[]):
boolean
=>
{
return
(
[
'
succeeds
'
,
'
reverts
'
,
'
fails
'
,
'
benchmark
'
,
'
works
'
].
includes
(
parts
[
parts
.
length
-
1
]
)
||
(
parts
[
parts
.
length
-
2
]
===
'
benchmark
'
&&
!
isNaN
(
parseInt
(
parts
[
parts
.
length
-
1
],
10
))
)
)
},
{
error
:
'
failure tests should have 4 parts, third part should indicate the reason for failure
'
,
check
:
(
parts
:
string
[]):
boolean
=>
{
return
(
parts
.
length
===
4
||
!
[
'
reverts
'
,
'
fails
'
].
includes
(
parts
[
parts
.
length
-
1
])
)
},
},
{
error
:
'
failure tests should have 4 parts, third part should indicate the reason for failure
'
,
check
:
(
parts
:
string
[]):
boolean
=>
{
return
(
parts
.
length
===
4
||
!
[
'
reverts
'
,
'
fails
'
].
includes
(
parts
[
parts
.
length
-
1
]
)
)
},
]
},
]
/**
* Script for checking that all test functions are named correctly.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment