Skip to content

Commit b0797ec

Browse files
committed
20221113 update : add test.ps1.
1 parent f2fa0a8 commit b0797ec

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

test.ps1

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Write-Host "Start Aspose.Cells Cloud SDK for NodeJS"
2+
$StartTime = Get-Date
3+
$passed = 0
4+
$total =0
5+
$failed = 0
6+
$skipped =0
7+
[string[]]$lines = npm test
8+
foreach ($line in $lines) {
9+
if($line -match "(\d+) passing "){
10+
$passed=$matches[1]
11+
}
12+
if($line -match "(\d+) failing"){
13+
$failed=$matches[1]
14+
break
15+
}
16+
}
17+
$total = $passed/1 + $failed/1
18+
$EndTime = Get-Date
19+
$timespan ="{0:N2}" -f (New-TimeSpan $StartTime $EndTime).TotalSeconds
20+
Write-Host "Spent ${timespan}s on finishing test. Result : Total ${total}, Passed ${passed} , Failed ${failed} ,Skipped ${skipped} ."
21+

0 commit comments

Comments
 (0)