Skip to content

Commit f7c4744

Browse files
committed
added test for nu plugin node
1 parent 3cf158f commit f7c4744

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
node %~dp0nu_plugin_node_example %*

javascript/nu_plugin_node_example.js renamed to javascript/nu_plugin_node_example/nu_plugin_node_example.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111

1212
// Configuration constants
13-
const { NUSHELL_VERSION } = require("../version");
13+
const { NUSHELL_VERSION } = require("../../version");
1414
const PLUGIN_VERSION = '0.1.1';
1515

1616
// Core protocol functions
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
use std/testing *
2+
use std/assert
3+
4+
@test
5+
def test [] {
6+
let expected = (0..9 | generate {|i| {out: {one: $i, two: ($i * 2), three: ($i * 3)}, next: ($i + 1)}} 0)
7+
assert equal (node_example 1 a) $expected
8+
assert length (node_example 1 a) 10
9+
}

0 commit comments

Comments
 (0)