Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port before_v0.60/config_management before_v0.60/language before_v0.60/prompt before_v0.60/tests #851

Merged
Prev Previous commit
Next Next commit
move tests/language/std/date.nu -> modules/language/std/date.nu
- remove `main.nu`, there was only `source date.nu`
- adjust script for `playgroud/lib`
  • Loading branch information
39555 committed May 26, 2024
commit 71ceb75809a7012d65463bf33d87b6522e4d5916
34 changes: 34 additions & 0 deletions modules/language/tests/date.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
source ../playground/lib.nu
source ../std/date.nu

def mock-now [] {
"2021-08-29 03:31:21" | into datetime
}

def people [] {
[
[ 'name', 'tz'];
[ 'andres', 'America/Guayaquil']
[ 'fdncred', 'US/Central']
]
}

playground "std/date" {

scene 'command: "date local"' {

play "adds times in local timezone" {|topic|

let expected_times = [
"Sun Aug 29 03:31:21 2021"
"Sun Aug 29 03:31:21 2021"
] | into datetime;
let actual = (people | date local (mock-now) | get time | into datetime)

expect $topic $actual --to-be $expected_times

}

}

}
38 changes: 0 additions & 38 deletions modules/tests/language/std/date.nu

This file was deleted.

2 changes: 0 additions & 2 deletions modules/tests/main.nu

This file was deleted.