Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
俞永鹏
openzeppelin-contracts-upgradeable
Commits
7cab19a2
Commit
7cab19a2
authored
Feb 23, 2021
by
Francisco Giordano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check upgradeable paths in migrate-imports test
(cherry picked from commit
4ee9fd77
)
parent
556cdf5f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
+6
-1
migrate-imports.js
scripts/migrate-imports.js
+1
-0
migrate-imports.test.js
test/migrate-imports.test.js
+5
-1
No files found.
scripts/migrate-imports.js
View file @
7cab19a2
...
...
@@ -163,6 +163,7 @@ function getUpgradeablePath (file) {
module
.
exports
=
{
pathUpdates
,
updateImportPaths
,
getUpgradeablePath
,
};
if
(
require
.
main
===
module
)
{
...
...
test/migrate-imports.test.js
View file @
7cab19a2
...
...
@@ -2,12 +2,16 @@ const path = require('path');
const
{
promises
:
fs
,
constants
:
{
F_OK
}
}
=
require
(
'fs'
);
const
{
expect
}
=
require
(
'chai'
);
const
{
pathUpdates
,
updateImportPaths
}
=
require
(
'../scripts/migrate-imports.js'
);
const
{
pathUpdates
,
updateImportPaths
,
getUpgradeablePath
}
=
require
(
'../scripts/migrate-imports.js'
);
describe
(
'migrate-imports.js'
,
function
()
{
it
(
'every new path exists'
,
async
function
()
{
for
(
const
p
of
Object
.
values
(
pathUpdates
))
{
try
{
await
fs
.
access
(
path
.
join
(
'contracts'
,
p
),
F_OK
);
}
catch
(
e
)
{
await
fs
.
access
(
path
.
join
(
'contracts'
,
getUpgradeablePath
),
F_OK
);
}
}
});
...
...
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