Skip to content

Commit

Permalink
chore: add e2e-tests to single lint configuration (#1226)
Browse files Browse the repository at this point in the history
* chore: add e2e-tests to linting

* cleanup package.json
  • Loading branch information
TarikGul committed Feb 13, 2023
1 parent 80f4e2c commit f546abc
Show file tree
Hide file tree
Showing 18 changed files with 570 additions and 766 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
**/build/*
calc
docs
e2e-tests
1 change: 0 additions & 1 deletion e2e-tests/.eslintignore

This file was deleted.

1 change: 0 additions & 1 deletion e2e-tests/.eslintrc.js

This file was deleted.

12 changes: 7 additions & 5 deletions e2e-tests/helpers/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ export const request = (
http.get({ path, hostname, port }, (response) => {
let data = '';
response.on('data', (_data) => (data += _data));
response.on('end', () => resolve({
data,
path,
statusCode: response.statusCode,
}));
response.on('end', () =>
resolve({
data,
path,
statusCode: response.statusCode,
})
);
});
});
};
2 changes: 1 addition & 1 deletion e2e-tests/historical-e2e-tests.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import { endpoints } from './historical/endpoints';
import { HOST, PORT } from './helpers/consts';
import { request } from './helpers/request';
import { endpoints } from './historical/endpoints';
import {
AccountsResponse,
ChainSpec,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ export const parasAuctionsCurrentEndpoints = [
], // v9160 - endingPeriod
[
'/paras/auctions/current?at=11800000',
JSON.stringify(parasAuctionsCurrent11800000)
JSON.stringify(parasAuctionsCurrent11800000),
], // v9170 - startingPeriod
[
'/paras/auctions/current?at=11821201',
JSON.stringify(parasAuctionsCurrent11821201)
JSON.stringify(parasAuctionsCurrent11821201),
], // v9170 - endingPeriod
];
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ export const parasLeasesCurrentEndpoints = [
], // v9160
[
'/paras/leases/current?at=11800000',
JSON.stringify(parasLeasesCurrent11800000)
JSON.stringify(parasLeasesCurrent11800000),
], // v9170
];
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ export const polkadotAccountBalanceEndpoints = [
], // v9151
[
'/accounts/15kUt2i86LHRWCkE3D9Bg1HZAoc2smhn1fwPzDERTb1BXAkX/balance-info?at=9500000',
JSON.stringify(accountBalance9500000)
JSON.stringify(accountBalance9500000),
], // v9170
];
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,32 @@ import accountBalance1300000 from './1300000.json';
import accountBalance1800000 from './1800000.json';

export const statemineAccountBalanceEndpoints = [
[
'/accounts/H4DU1hKQeLkR5bhMeMidarF9bVvrH3k6ybLz84YLs7eRQMu/balance-info?at=450000',
JSON.stringify(accountBalance450000),
], // v2
[
'/accounts/H4DU1hKQeLkR5bhMeMidarF9bVvrH3k6ybLz84YLs7eRQMu/balance-info?at=650000',
JSON.stringify(accountBalance650000),
], // v3
[
'/accounts/H4DU1hKQeLkR5bhMeMidarF9bVvrH3k6ybLz84YLs7eRQMu/balance-info?at=960000',
JSON.stringify(accountBalance960000),
], // v4
[
'/accounts/H4DU1hKQeLkR5bhMeMidarF9bVvrH3k6ybLz84YLs7eRQMu/balance-info?at=986791',
JSON.stringify(accountBalance986791),
], // v5
[
'/accounts/H4DU1hKQeLkR5bhMeMidarF9bVvrH3k6ybLz84YLs7eRQMu/balance-info?at=1100000',
JSON.stringify(accountBalance1100000),
], // v504
[
'/accounts/H4DU1hKQeLkR5bhMeMidarF9bVvrH3k6ybLz84YLs7eRQMu/balance-info?at=1300000',
JSON.stringify(accountBalance1300000),
], // v601
[
'/accounts/H4DU1hKQeLkR5bhMeMidarF9bVvrH3k6ybLz84YLs7eRQMu/balance-info?at=1800000',
JSON.stringify(accountBalance1800000),
], // v700
[
'/accounts/H4DU1hKQeLkR5bhMeMidarF9bVvrH3k6ybLz84YLs7eRQMu/balance-info?at=450000',
JSON.stringify(accountBalance450000),
], // v2
[
'/accounts/H4DU1hKQeLkR5bhMeMidarF9bVvrH3k6ybLz84YLs7eRQMu/balance-info?at=650000',
JSON.stringify(accountBalance650000),
], // v3
[
'/accounts/H4DU1hKQeLkR5bhMeMidarF9bVvrH3k6ybLz84YLs7eRQMu/balance-info?at=960000',
JSON.stringify(accountBalance960000),
], // v4
[
'/accounts/H4DU1hKQeLkR5bhMeMidarF9bVvrH3k6ybLz84YLs7eRQMu/balance-info?at=986791',
JSON.stringify(accountBalance986791),
], // v5
[
'/accounts/H4DU1hKQeLkR5bhMeMidarF9bVvrH3k6ybLz84YLs7eRQMu/balance-info?at=1100000',
JSON.stringify(accountBalance1100000),
], // v504
[
'/accounts/H4DU1hKQeLkR5bhMeMidarF9bVvrH3k6ybLz84YLs7eRQMu/balance-info?at=1300000',
JSON.stringify(accountBalance1300000),
], // v601
[
'/accounts/H4DU1hKQeLkR5bhMeMidarF9bVvrH3k6ybLz84YLs7eRQMu/balance-info?at=1800000',
JSON.stringify(accountBalance1800000),
], // v700
];
2 changes: 1 addition & 1 deletion e2e-tests/historical/historical.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const argv = process.argv.slice(0, 2);

/**
* The arg parser takes in two commands. This file also directly relates to the historical e2e-tests.
*
*
* @arg --chain The chain to be passed into the jest test
* @arg --config The path to the correct jest config. This is important as the
* jest config inside of /runtime-tests ignores all the other tests.
Expand Down
Loading

0 comments on commit f546abc

Please sign in to comment.