Use Prettier for JS files (#3913)

Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
This commit is contained in:
Francisco
2023-01-04 11:03:40 -03:00
committed by GitHub
parent 88754d0b36
commit a28aafdc85
135 changed files with 2737 additions and 3121 deletions

View File

@ -4,9 +4,14 @@ const { expectRevertCustomError } = require('../../helpers/customError');
const DoubleEndedQueue = artifacts.require('$DoubleEndedQueue');
/** Rebuild the content of the deque as a JS array. */
const getContent = (deque) => deque.$length(0).then(bn =>
Promise.all(Array(bn.toNumber()).fill().map((_, i) => deque.$at(0, i))),
);
const getContent = deque =>
deque.$length(0).then(bn =>
Promise.all(
Array(bn.toNumber())
.fill()
.map((_, i) => deque.$at(0, i)),
),
);
contract('DoubleEndedQueue', function () {
const bytesA = '0xdeadbeef'.padEnd(66, '0');
@ -37,7 +42,7 @@ contract('DoubleEndedQueue', function () {
await this.deque.$pushBack(0, bytesB);
await this.deque.$pushFront(0, bytesA);
await this.deque.$pushBack(0, bytesC);
this.content = [ bytesA, bytesB, bytesC ];
this.content = [bytesA, bytesB, bytesC];
});
it('getters', async function () {