tests: move is_nodejs_working() to jsgen_test.v

This commit is contained in:
Delyan Angelov 2021-01-25 18:46:21 +02:00
parent 3199b982a9
commit cb04e6dccc
No known key found for this signature in database
GPG key ID: 66886C0F12D595ED
2 changed files with 30 additions and 19 deletions

View file

@ -108,19 +108,8 @@ pub fn (mut ts TestSession) print_messages() {
}
}
fn is_nodejs_working() bool {
node_res := os.exec('node --version') or { return false }
if node_res.exit_code != 0 {
return false
}
return true
}
pub fn new_test_session(_vargs string) TestSession {
mut skip_files := []string{}
if !is_nodejs_working() {
skip_files << 'vlib/v/gen/js/jsgen_test.v'
}
$if solaris {
skip_files << 'examples/gg/gg2.v'
skip_files << 'examples/pico/pico.v'