Skip to content

Commit

Permalink
Add validation for output of integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
niloc132 committed Nov 26, 2023
1 parent 7408030 commit c6665d5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions j2cl-maven-plugin/src/it/registry-sample/postbuild.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
def js = new File(basedir, 'target/registry-sample-1.0/registry-sample/registry-sample.js').text

if (!js.contains('"Hello, Java!"')) {
throw new IllegalStateException('Contents weren\'t optimized correctly, no "Hello, Java!" string')
}
if (js.contains('python') || js.contains('Python')) {
throw new IllegalStateException('Contents weren\'t optimized correctly, \'python\' found in output')
}

0 comments on commit c6665d5

Please sign in to comment.