From 837fd2a6c60a304d180cb46efbc4fcb8a6d5760e Mon Sep 17 00:00:00 2001 From: Nolan Erck Date: Mon, 7 Oct 2024 17:11:58 -0700 Subject: [PATCH] Adding tests --- tests/specs/coverage/CoverageServiceTest.cfc | 3 ++- tests/specs/coverage/browser/CodeBrowserTest.cfc | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 tests/specs/coverage/browser/CodeBrowserTest.cfc diff --git a/tests/specs/coverage/CoverageServiceTest.cfc b/tests/specs/coverage/CoverageServiceTest.cfc index 16b9faf..d6bf14c 100644 --- a/tests/specs/coverage/CoverageServiceTest.cfc +++ b/tests/specs/coverage/CoverageServiceTest.cfc @@ -16,7 +16,8 @@ component extends="testbox.system.BaseSpec" { .toHaveKey( "blacklist" ) .toHaveKey( "whitelist" ) .toHaveKey( "browser" ) - .toHaveKey( "sonarqube" ); + .toHaveKey( "sonarqube" ) + .toHaveKey( "coverageThresholds" ); if ( isFRLoaded() ) { expect( model.getCoverageEnabled() ).toBeTrue( diff --git a/tests/specs/coverage/browser/CodeBrowserTest.cfc b/tests/specs/coverage/browser/CodeBrowserTest.cfc new file mode 100644 index 0000000..fe1f9be --- /dev/null +++ b/tests/specs/coverage/browser/CodeBrowserTest.cfc @@ -0,0 +1,14 @@ +/** + * This tests the CodeBrowser functionality in TestBox. + */ +component extends="testbox.system.BaseSpec" { + + function run(){ + describe( "CodeBrowser", function(){ + it( "can init", function(){ + expect( new system.coverage.browser.CodeBrowser ( {} ) ).toBeComponent(); + } ); + } ); + } + +}