Skip to content

Commit

Permalink
Remove redundant perByte tests
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanHahn committed Jul 6, 2023
1 parent eb7d08f commit 0e6b481
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions src/co2.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,7 @@ describe("co2", () => {
let har, co2;

describe("1 byte model", () => {
const {
TGWF_GREY_VALUE,
TGWF_GREEN_VALUE,
TGWF_MIXED_VALUE,
MILLION_GREY,
MILLION_GREEN,
} = ONEBYTE;
const { TGWF_GREY_VALUE, TGWF_GREEN_VALUE, TGWF_MIXED_VALUE } = ONEBYTE;

beforeEach(() => {
co2 = new CO2({ model: "1byte" });
Expand All @@ -31,19 +25,6 @@ describe("co2", () => {
);
});

describe("perByte", () => {
it("returns a CO2 number for data transfer using 'grey' power", () => {
expect(co2.perByte(MILLION).toFixed(5)).toBe(MILLION_GREY.toFixed(5));
});

it("returns a lower CO2 number for data transfer from domains using entirely 'green' power", () => {
expect(co2.perByte(MILLION).toFixed(5)).toBe(MILLION_GREY.toFixed(5));
expect(co2.perByte(MILLION, true).toFixed(5)).toBe(
MILLION_GREEN.toFixed(5)
);
});
});

describe("perPage", () => {
it("returns CO2 for total transfer for page", () => {
const pages = pagexray.convert(har);
Expand Down

0 comments on commit 0e6b481

Please sign in to comment.