@melonproject/protocol
Version:
Technology Regulated and Operated Investment Funds
35 lines (34 loc) • 1.72 kB
JavaScript
;
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const initTestEnvironment_1 = require("../../../tests/utils/initTestEnvironment");
const deployTestingPriceFeed_1 = require("./deployTestingPriceFeed");
describe('deploy', () => {
const shared = {};
beforeAll(() => __awaiter(this, void 0, void 0, function* () {
shared.env = yield initTestEnvironment_1.initTestEnvironment();
shared.quoteToken = {
address: '0xf9Df6AEc03A59503AD596B9AB68b77dc2937F69D',
decimals: 18,
symbol: 'ETH',
};
}));
it('deploy', () => __awaiter(this, void 0, void 0, function* () {
const address = yield deployTestingPriceFeed_1.deployTestingPriceFeed(shared.env, shared.quoteToken);
expect(address).toBeTruthy();
}));
it('deploy with wrong address', () => __awaiter(this, void 0, void 0, function* () {
yield expect(deployTestingPriceFeed_1.deployTestingPriceFeed(shared.env, {
address: '0xqwer',
decimals: 2,
symbol: 'BADADDR',
})).rejects.toThrow();
}));
});