Skip to content

Commit 04b9b39

Browse files
authored
Fix doc snippets. (NativeScript#3882)
* Remove a duplicate snippet: image-create-datauri * Remove a reference to a missing snippet: console-dump * Readd a missing snippet: imagesource-resname * Fix a broken snippet reference: timer-set-ten * Fix a broken snippet reference: timer-set-fifty
1 parent 1dfc3da commit 04b9b39

File tree

5 files changed

+5
-10
lines changed

5 files changed

+5
-10
lines changed

tests/app/console/console.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ Asserts a boolean condition and prints a message in case the assert fails.
2626
Prints the state of the specified object to the console.
2727
{%snippet console-dir%}
2828

29-
### Dump
30-
Prints the state of the specified object to the console.
31-
{%snippet console-dump%}
32-
3329
### Trace
3430
Prints the current stack trace in the console.
3531
{%snippet console-trace%}

tests/app/image-source/image-source-tests.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ var imagePath = "~/logo.png";
1616
var smallImagePath = "~/small-image.png";
1717

1818
export function testFromResource() {
19+
// >> imagesource-resname
1920
var img = imageSource.fromResource("icon");
21+
// << imagesource-resname
2022
TKUnit.assert(img.height > 0, "image.fromResource failed");
2123
}
2224

tests/app/timer/timer-tests.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,11 @@ export function test_setTimeout_callbackShouldBeCleared() {
8282
completed = true;
8383
// << (hide)
8484
}, 50);
85-
// << timer-set-fifty
8685

8786
//// Clear timeout with specified id.
8887
timer.clearTimeout(id);
8988

90-
// << timer-set-twothousands
89+
// << timer-set-fifty
9190

9291
TKUnit.wait(0.060);
9392
timer.clearTimeout(id);

tests/app/timer/timer.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ previous_url: /ApiReference/timer/HOW-TO
1313
{%snippet timer-set-zero%}
1414

1515
### Evaluates an expression after a specified number of milliseconds.
16-
{%snippet timer-set-fivehundred%}
16+
{%snippet timer-set-ten%}
1717

1818
### Cancels the evaluation with the clearTimeout method.
19-
{%snippet timer-set-twothousands%}
19+
{%snippet timer-set-fifty%}
2020

2121
### Evaluates an expression each time a specified number of milliseconds has elapsed.
2222
{%snippet timer-set-expression%}

tests/app/ui/image/image-tests.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,8 @@ export const test_SettingImageSrcToDataURI_sync = function () {
126126
};
127127

128128
export const test_SettingImageSrcToDataURI_async = function (done) {
129-
// >> img-create-datauri
130129
const image = new ImageModule.Image();
131130
image.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAAXNSR0IArs4c6QAAABxpRE9UAAAAAgAAAAAAAAACAAAAKAAAAAIAAAACAAAARiS4uJEAAAASSURBVBgZYvjPwABHSMz/DAAAAAD//0GWpK0AAAAOSURBVGNgYPiPhBgQAACEvQv1D5y/pAAAAABJRU5ErkJggg==";
132-
// << img-create-datauri
133131

134132
runImageTestAsync(image, image.src, done);
135133
};

0 commit comments

Comments
 (0)