1 | const contract = require("@truffle/contract");
|
2 | const Schema = require("../");
|
3 | const assert = require("assert");
|
4 | const MetaCoin = require("./MetaCoin.json");
|
5 |
|
6 | describe("networkType", () => {
|
7 | const defaultNetworkType = "ethereum";
|
8 | const customSupportedNetworkType = "quorum";
|
9 | const MetaCoinContract = contract(MetaCoin);
|
10 |
|
11 | it("normalized has correct default networkType", () => {
|
12 | const normalized = Schema.normalize(MetaCoinContract);
|
13 | assert.deepEqual(normalized.networkType, defaultNetworkType);
|
14 | });
|
15 |
|
16 | it("normalized has correct custom supported networkType", () => {
|
17 | MetaCoinContract.networkType = customSupportedNetworkType;
|
18 | const normalized = Schema.normalize(MetaCoinContract);
|
19 | assert.deepEqual(normalized.networkType, customSupportedNetworkType);
|
20 | });
|
21 | });
|