FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
NativeScript/apps/tests/console-tests.ts at patch-1 · rclai/NativeScript · GitHub
rclai
NativeScript
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
NativeScript
/
apps
/
tests
/
console-tests.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
70 lines (65 loc) · 2.12 KB
Breadcrumbs
NativeScript
/
apps
/
tests
/
console-tests.ts
Copy path
File metadata and controls
70 lines (65 loc) · 2.12 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
export
var
test_DummyTestForSnippetOnly0
=
function
(
)
{
// <snippet module="console" title="console">
// # Console
// ### Logging
// Logging to the console does not require the "console" module since the console variable is global. It can be used anywhere within your code.
// You can log your message in several different categories.
// ``` JavaScript
//// Verbously logs a message.
console
.
log
(
"Hello, world!"
)
;
console
.
info
(
"I am NativeScript"
)
;
console
.
warn
(
"Low memory"
)
;
console
.
error
(
"Uncaught Application Exception"
)
;
// ```
// </snippet>
}
export
var
test_DummyTestForSnippetOnly1
=
function
(
)
{
// <snippet module="console" title="console">
// ### Time
// ``` JavaScript
//// Begins counting a time span for a given name (key).
console
.
time
(
"LoadTime"
)
;
//// Do something...
//// Ends a previously started time span through the time method.
console
.
timeEnd
(
"LoadTime"
)
;
// ```
// </snippet>
}
export
var
test_DummyTestForSnippetOnly2
=
function
(
)
{
// <snippet module="console" title="console">
// ### Assert
// ``` JavaScript
//// Asserts a boolean condition and prints a message in case the assert fails.
console
.
assert
(
2
===
2
,
"2 equals 2"
)
;
// ```
// </snippet>
}
export
var
test_DummyTestForSnippetOnly3
=
function
(
)
{
// <snippet module="console" title="console">
// ### Dir
// ``` JavaScript
//// Prints the state of the specified object to the console.
var
obj
=
{
name
:
"John"
,
age
:
34
}
;
console
.
dir
(
obj
)
;
// ```
// </snippet>
}
export
var
test_DummyTestForSnippetOnly4
=
function
(
)
{
// <snippet module="console" title="console">
// ### Dump
// ``` JavaScript
//// Prints the state of the specified object to the console.
var
obj
=
{
name
:
"John"
,
age
:
34
}
;
console
.
dump
(
obj
)
;
// ```
// </snippet>
}
export
var
test_DummyTestForSnippetOnly5
=
function
(
)
{
// <snippet module="console" title="console">
// ### Trace
// ``` JavaScript
//// Prints the current stack trace in the console.
console
.
trace
(
)
;
// ```
// </snippet>
}
Back
|
FazBrowse Home
|
New Git URL