Skip to content

Commit

Permalink
Add unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Dionysusnu committed Apr 6, 2024
1 parent 3b9767a commit c6d6c33
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/src/diagnostics/noRobloxSymbolInstanceof.1.ts
@@ -0,0 +1 @@
({}) instanceof CFrame;
1 change: 1 addition & 0 deletions tests/src/diagnostics/noRobloxSymbolInstanceof.2.ts
@@ -0,0 +1 @@
({}) instanceof pairs;
3 changes: 3 additions & 0 deletions tests/src/diagnostics/noRobloxSymbolInstanceof.3.ts
@@ -0,0 +1,3 @@
type Helper = 1 extends number ? CFrameConstructor : typeof Map;
declare const x: Helper;
({}) instanceof x;
3 changes: 3 additions & 0 deletions tests/src/diagnostics/noRobloxSymbolInstanceof.4.ts
@@ -0,0 +1,3 @@
type Helper = CFrameConstructor | typeof Map;
declare const x: Helper;
({}) instanceof x;
3 changes: 3 additions & 0 deletions tests/src/diagnostics/noRobloxSymbolInstanceof.5.ts
@@ -0,0 +1,3 @@
type Helper = typeof pairs;
declare const x: Helper;
({}) instanceof x;
2 changes: 2 additions & 0 deletions tests/src/diagnostics/noRobloxSymbolInstanceof.6.ts
@@ -0,0 +1,2 @@
const x = CFrame;
({}) instanceof x;
2 changes: 2 additions & 0 deletions tests/src/diagnostics/noRobloxSymbolInstanceof.7.ts
@@ -0,0 +1,2 @@
const x = pairs;
({}) instanceof x;
3 changes: 3 additions & 0 deletions tests/src/diagnostics/noRobloxSymbolInstanceof.8.ts
@@ -0,0 +1,3 @@
function x<T extends CFrameConstructor | typeof Map>(p: T) {
({}) instanceof p;
}
3 changes: 3 additions & 0 deletions tests/src/diagnostics/noRobloxSymbolInstanceof.9.ts
@@ -0,0 +1,3 @@
function x<T extends number | string>(p: T extends number ? CFrameConstructor : typeof Map) {
({}) instanceof p;
}

0 comments on commit c6d6c33

Please sign in to comment.