Skip to content

Commit

Permalink
test: convert diagnostic adapter tests to jasmine
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed May 14, 2021
1 parent 201ed35 commit 4717aaf
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/adapters/diagnostics-adapter-test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable import/no-deprecated */
import { Range } from "atom"
import { expect } from "chai"
import * as path from "path"
import IdeDiagnosticAdapter from "../../lib/adapters/diagnostic-adapter"
import Convert from "../../lib/convert"
Expand Down Expand Up @@ -34,9 +33,9 @@ describe("IdeDiagnosticAdapter", () => {
// using private method
// eslint-disable-next-line dot-notation
const getDiagnosticCode = adapter["getDiagnosticCode"]
expect(getDiagnosticCode(mockEditor, new Range([1, 2], [3, 4]), "Test message")).to.equal("test code")
expect(getDiagnosticCode(mockEditor, new Range([1, 2], [3, 4]), "Test message2")).to.not.exist
expect(getDiagnosticCode(mockEditor, new Range([1, 2], [3, 5]), "Test message")).to.not.exist
expect(getDiagnosticCode(mockEditor, new Range([1, 2], [3, 4]), "Test message")).toEqual("test code")
expect(getDiagnosticCode(mockEditor, new Range([1, 2], [3, 4]), "Test message2")).toBeUndefined()
expect(getDiagnosticCode(mockEditor, new Range([1, 2], [3, 5]), "Test message")).toBeUndefined()
})
})
})

0 comments on commit 4717aaf

Please sign in to comment.