-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMarkX.tests.ps1
More file actions
35 lines (27 loc) · 1.05 KB
/
MarkX.tests.ps1
File metadata and controls
35 lines (27 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
describe MarkX {
context 'Markdown and XML' {
it 'Gets markdown as XML' {
"# Hello world" |
MarkX |
Select-Object -ExpandProperty InnerText |
Should -Be 'Hello World'
}
it 'Can change' {
$markx = "# Hello world" | MarkX
$markx |
Select-Object -ExpandProperty InnerText |
Should -Be 'Hello World'
$markx.Markdown = '# I can change'
$markx |
Select-Object -ExpandProperty InnerText |
Should -Be 'I can change'
}
it 'Can contain tables' {
$markx = "|a|b|c|","|-|-|-|", "|1|2|3|" | MarkX
$markx.DB.Tables[0].Rows[0].a | Should -Be 1
$markx.DB.Tables[0].Columns[0].DataType | Should -Not -Be ([string])
$markx.DB.Tables[0].Rows[0].b | Should -Be 2
$markx.DB.Tables[0].Rows[0].c | Should -Be 3
}
}
}