Skip to content

Commit

Permalink
Renamed helpers tests to match src.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock committed Jun 6, 2024
1 parent 698266e commit a1ca7c9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
25 changes: 25 additions & 0 deletions tools/tests/tester/helpers.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/

import { overall_result } from '../../src/tester/helpers'
import { type Evaluation, Result } from '../../src/tester/types/eval.types'

describe('helpers', () => {
function e (...results: Result[]): Evaluation[] {
return results.map(result => ({ result }))
}

test('overall_result', () => {
expect(overall_result(e(Result.PASSED, Result.SKIPPED, Result.FAILED, Result.ERROR))).toBe(Result.ERROR)
expect(overall_result(e(Result.PASSED, Result.SKIPPED, Result.FAILED))).toBe(Result.FAILED)
expect(overall_result(e(Result.PASSED, Result.SKIPPED))).toBe(Result.SKIPPED)
expect(overall_result(e(Result.PASSED))).toBe(Result.PASSED)
expect(overall_result(e())).toBe(Result.PASSED)
})
})
22 changes: 0 additions & 22 deletions tools/tests/tester/overall_result.test.ts

This file was deleted.

0 comments on commit a1ca7c9

Please sign in to comment.