import { assert } from "chai" ; import { ExecuteResultLine } from "../then-steps" ; import { compareExecuteResultLine } from "./compare-execute-result-line" ; suite ( "executeResultLine" , function ( ) { test ( "different files" , function ( ) { const a = { filename : "1.md" , line : 1 , } ; const b = { filename : "2.md" , line : 1 , } ; assert . equal ( compareExecuteResultLine ( a , b ) , - 1 ) ; assert . equal ( compareExecuteResultLine ( b , a ) , 1 ) ; assert . equal ( compareExecuteResultLine ( a , a ) , 0 ) ; } ) ; test ( "same file different lines" , function ( ) { const a = { filename : "1.md" , line : 1 , } ; const b = { filename : "1.md" , line : 2 , } ; assert . equal ( compareExecuteResultLine ( a , b ) , - 1 ) ; assert . equal ( compareExecuteResultLine ( b , a ) , 1 ) ; assert . equal ( compareExecuteResultLine ( a , a ) , 0 ) ; } ) ; test ( "same file same lines" , function ( ) { const a = { filename : "1.md" , line : 1 , } ; assert . equal ( compareExecuteResultLine ( a , a ) , 0 ) ; } ) ; } ) ;