Skip to content

Commit f18be3c

Browse files
committed
started writing tests
1 parent f7c4744 commit f18be3c

File tree

14 files changed

+44
-6
lines changed

14 files changed

+44
-6
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
/target
1+
/target
2+
3+
/.venv
4+
__pycache__

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22.14

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
@echo off
2-
node %~dp0nu_plugin_node_example %*
2+
node %~dp0nu_plugin_node_example.js %*

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
File renamed without changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
nu %~dp0nu_plugin_nu_example.nu %*

nushell/nu_plugin_nu_example.nu renamed to nushell/nu_plugin_nu_example/nu_plugin_nu_example.nu

File renamed without changes.
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+
}
File renamed without changes.

0 commit comments

Comments
 (0)