-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure cost is shown even when equaling 0
Fixes #634
- Loading branch information
Showing
3 changed files
with
18 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { PlanService } from "@/services/plan-service" | ||
import type { IPlan, IPlanContent } from "@/interfaces" | ||
|
||
describe("PlanService", () => { | ||
test("Computes exclusive cost correctly", () => { | ||
const planService = new PlanService() | ||
|
||
// tslint:disable:max-line-length | ||
const source = `Seq Scan on atividade_economica ae (cost=0.00..0.00 rows=1 width=36)` | ||
|
||
const r = planService.fromSource(source) as IPlanContent | ||
const plan: IPlan = planService.createPlan("", r, "") | ||
const root = plan.content.Plan | ||
root && expect(root["*Cost (exclusive)"]).toBe(0) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters