0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-01 12:16:11 -05:00

remove integration tests for now, we have unit tests for that

This commit is contained in:
Bartek Iwańczuk 2024-12-23 09:10:39 +01:00
parent fdea4eaa7e
commit a2bacbb030
No known key found for this signature in database
GPG key ID: 0C6BCDDC3B3AD750
23 changed files with 0 additions and 612 deletions

View file

@ -1,39 +0,0 @@
{
"tests": {
"program": {
"cwd": "./program",
"args": "lint --plugins=./plugin.ts source.ts",
"output": "program/log.out"
},
"declarations": {
"cwd": "./declarations",
"args": "lint --plugins=./plugin.ts source.ts",
"output": "declarations/log.out"
},
"statements": {
"cwd": "./statements",
"args": "lint --config=./statements/deno.json source.ts",
"output": "statements/log.out"
},
"expressions": {
"cwd": "./expressions",
"args": "lint --plugins=./plugin.ts source.ts",
"output": "expressions/log.out"
},
"literals": {
"cwd": "./literals",
"args": "lint --plugins=./plugin.ts source.ts",
"output": "literals/log.out"
},
"jsx": {
"cwd": "./jsx",
"args": "lint --plugins=./plugin.ts source.tsx",
"output": "jsx/log.out"
},
"ts": {
"cwd": "./ts",
"args": "lint --plugins=./plugin.ts source.tsx",
"output": "ts/log.out"
}
}
}

View file

@ -1,2 +0,0 @@
BreakStatement { type: "BreakStatement", range: [ 19, 25 ] }
BreakStatement { type: "BreakStatement", range: [ 54, 66 ] }

View file

@ -1,20 +0,0 @@
export default {
name: "ast_plugin",
rules: {
ast: {
create() {
return {
BreakStatement(node) {
console.log(node);
},
ContinueStatement(node) {
console.log(node);
},
ReturnStatement(node) {
console.log(node);
},
};
},
},
},
} satisfies Deno.LintPlugin;

View file

@ -1,35 +0,0 @@
const a1;
const a2 = 1;
const a3, b3;
let a4 = 1;
var a4 = 1;
function foo1() {}
function foo2(a, b = 2) {}
function foo3(a, b?: number = 2): void {}
function foo4(a, ...rest: any[]) {}
function foo5({ a = 2 }) {}
function foo6([a, b]) {}
function foo7<T, U>(a: T, b: U) {}
async function foo8() {}
async function* foo9() {
yield 2;
}
export const e = 2;
export let e2 = 2;
export function e3() {}
export default () => {};
export * from "./foo.ts";
import * as imp1 from "./foo.ts";
import imp2 from "./foo.ts";
import { imp3, imp4 as imp5 } from "./foo.ts";
import json from "./json.json" with { type: "json" };
// Patterns
function foo10([a, b]) {}
function foo11({ a }) {}
function foo11(a = 3) {}

View file

@ -1,27 +0,0 @@
CallExpression {
type: "CallExpression",
range: [ 9, 14 ],
optional: false
}
CallExpression {
type: "CallExpression",
range: [ 16, 25 ],
optional: false
}
CallExpression {
type: "CallExpression",
range: [ 27, 41 ],
optional: false
}
MemberExpression {
type: "MemberExpression",
range: [ 83, 86 ],
optional: false,
computed: false
}
MemberExpression {
type: "MemberExpression",
range: [ 88, 94 ],
optional: false,
computed: true
}

View file

@ -1,17 +0,0 @@
export default {
name: "ast_plugin",
rules: {
ast: {
create() {
return {
CallExpression(node) {
console.log(node);
},
MemberExpression(node) {
console.log(node);
},
};
},
},
},
} satisfies Deno.LintPlugin;

View file

@ -1,55 +0,0 @@
// Call
foo();
foo(1, 2);
foo(1, ...bar);
foo(1, a = 2);
// FIXME foo?.(1);
// MemberExpression
a.b;
a["b"];
// BinaryExpression
1 == 1;
1 != 1;
1 === 1;
1 !== 1;
1 < 2;
1 <= 2;
1 > 0;
1 >= 0;
1 << 1;
1 >> 1;
1 >>> 1;
1 + 1;
1 - 1;
1 * 1;
1 / 1;
1 % 1;
1 | 1;
1 ^ 1;
1 & 1;
"foo" in {};
a instanceof Object;
1 ** 2;
// LogicalExpression
a && b;
a || b;
a ??= b;
// UnaryExpression
-1;
+1;
!1;
~1;
typeof 1;
void 0;
delete a.b;
// ConditionalExpression
a ? b : c;
// UpdateExpression
++a;
a++;

View file

@ -1,2 +0,0 @@
BreakStatement { type: "BreakStatement", range: [ 19, 25 ] }
BreakStatement { type: "BreakStatement", range: [ 54, 66 ] }

View file

@ -1,56 +0,0 @@
export default {
name: "ast_plugin",
rules: {
ast: {
create() {
return {
JSXAttribute(node) {
console.log(node);
},
JSXClosingElement(node) {
console.log(node);
},
JSXClosingFragment(node) {
console.log(node);
},
JSXExpressionContainer(node) {
console.log(node);
},
JSXElement(node) {
console.log(node);
},
JSXFragment(node) {
console.log(node);
},
JSXIdentifier(node) {
console.log(node);
},
JSXMemberExpression(node) {
console.log(node);
},
JSXNamespacedName(node) {
console.log(node);
},
JSXOpeningElement(node) {
console.log(node);
},
JSXOpeningFragment(node) {
console.log(node);
},
JSXSpreadAttribute(node) {
console.log(node);
},
// Ignored: This is part of the JSX spec but unused. No parser
// properly supports spread children.
// JSXSpreadChild(node) {
// console.log(node);
// },
JSXText(node) {
console.log(node);
},
};
},
},
},
} satisfies Deno.LintPlugin;

View file

@ -1,11 +0,0 @@
// @jsx preserve
let a = <></>;
a = <>foo</>;
a = <div />;
a = <div foo bar="baz" baz={1} foo-bar={fooBar} {...fooBar} />;
a = <div>foo</div>;
a = <Foo foo bar="baz" baz={1} foo-bar={fooBar} {...fooBar} />;
a = <Foo>foo</Foo>;
a = <Foo.Bar />;
a = <Foo.Bar>foo</Foo.Bar>;

View file

@ -1,44 +0,0 @@
StringLiteral {
type: "StringLiteral",
range: [ 1, 8 ],
value: "foo\n"
}
StringLiteral {
type: "StringLiteral",
range: [ 10, 16 ],
value: 'bar"'
}
NumericLiteral { type: "NumericLiteral", range: [ 18, 19 ], value: 2 }
NumericLiteral {
type: "NumericLiteral",
range: [ 21, 24 ],
value: 2.3
}
NumericLiteral { type: "NumericLiteral", range: [ 26, 31 ], value: 0 }
BooleanLiteral {
type: "BooleanLiteral",
range: [ 33, 37 ],
value: true
}
BooleanLiteral {
type: "BooleanLiteral",
range: [ 39, 44 ],
value: false
}
NullLiteral { type: "NullLiteral", range: [ 46, 50 ], value: null }
RegExpLiteral {
type: "RegExpLiteral",
range: [ 52, 56 ],
pattern: "a",
flags: "g"
}
RegExpLiteral {
type: "RegExpLiteral",
range: [ 58, 65 ],
pattern: "[/g]",
flags: "m"
}
BigIntLiteral { type: "BigIntLiteral", range: [ 67, 69 ], value: 1n }
ArrayExpression { type: "ArrayExpression", range: [ 82, 91 ] }
ArrayExpression { type: "ArrayExpression", range: [ 93, 104 ] }
ArrayExpression { type: "ArrayExpression", range: [ 106, 114 ] }

View file

@ -1,35 +0,0 @@
export default {
name: "ast_plugin",
rules: {
ast: {
create() {
return {
ArrayExpression(node) {
console.log(node);
},
BooleanLiteral(node) {
console.log(node);
},
BigIntLiteral(node) {
console.log(node);
},
NullLiteral(node) {
console.log(node);
},
NumericLiteral(node) {
console.log(node);
},
ObjectExpression(node) {
console.log(node);
},
RegExpLiteral(node) {
console.log(node);
},
StringLiteral(node) {
console.log(node);
},
};
},
},
},
} satisfies Deno.LintPlugin;

View file

@ -1,39 +0,0 @@
"foo\n";
'bar"';
2;
2.3;
0b000;
true;
false;
null;
/a/g;
/[/g]/m;
1n;
// arrays
[1, 2, 3];
[1, ...foo];
[1, , 3];
// objects
a = {};
a = { foo };
a = { foo: 1 };
a = { ...foo };
a = { ["foo\n"]: 1, 1: 2, "baz": 3 };
a = {
get foo() {
return 1;
},
// FIXME
// set foo(a) {
// 2;
// },
// bar() {},
// async barAsync() {},
// *barGen() {},
// async *barAsyncGen() {},
};
a = `foo`;
a = `foo${" "}bar`;

View file

@ -1 +0,0 @@
Program { type: "Program", range: [ 1, 1 ], sourceType: "script" }

View file

@ -1,14 +0,0 @@
export default {
name: "ast_plugin",
rules: {
ast: {
create() {
return {
Program(node) {
console.log(node);
},
};
},
},
},
} satisfies Deno.LintPlugin;

View file

@ -1,8 +0,0 @@
{
"lint": {
"plugins": ["./plugin.ts"],
"rules": {
"exclude": ["no-debugger"]
}
}
}

View file

@ -1,2 +0,0 @@
BreakStatement { type: "BreakStatement", range: [ 19, 25 ] }
BreakStatement { type: "BreakStatement", range: [ 54, 66 ] }

View file

@ -1,20 +0,0 @@
export default {
name: "ast_plugin",
rules: {
ast: {
create() {
return {
BreakStatement(node) {
console.log(node);
},
ContinueStatement(node) {
console.log(node);
},
ReturnStatement(node) {
console.log(node);
},
};
},
},
},
} satisfies Deno.LintPlugin;

View file

@ -1,79 +0,0 @@
// Break
while (false) {
break;
}
outer: while (false) {
break outer;
}
// Continue
while (false) {
continue;
}
outer: while (false) {
continue outer;
}
do {
} while (false);
// Debugger
debugger;
// Return
(() => {
return;
});
(() => {
return 1;
});
// For loops
for (const a in b) {
foo;
}
for (a in b) foo;
for (const a of b) foo;
for (const [a, b] of c) foo;
for (const { a, b } of c) foo;
for await (const a of b) foo;
for (let i = 0; i < 10; i++) {
foo;
}
switch (foo) {
case 1:
case 2:
break;
default:
foo;
}
try {
} catch (e) {
} finally {
}
try {
} finally {
}
try {
} catch {
}
try {
} catch (e) {
}
if (false) {
1;
}
if (false) {
1;
} else {
2;
}

View file

@ -1,27 +0,0 @@
CallExpression {
type: "CallExpression",
range: [ 9, 14 ],
optional: false
}
CallExpression {
type: "CallExpression",
range: [ 16, 25 ],
optional: false
}
CallExpression {
type: "CallExpression",
range: [ 27, 41 ],
optional: false
}
MemberExpression {
type: "MemberExpression",
range: [ 83, 86 ],
optional: false,
computed: false
}
MemberExpression {
type: "MemberExpression",
range: [ 88, 94 ],
optional: false,
computed: true
}

View file

@ -1,17 +0,0 @@
export default {
name: "ast_plugin",
rules: {
ast: {
create() {
return {
CallExpression(node) {
console.log(node);
},
MemberExpression(node) {
console.log(node);
},
};
},
},
},
} satisfies Deno.LintPlugin;

View file

@ -1,62 +0,0 @@
let a: [number, foo: number] = [1, 2];
type A1 = boolean;
type A2 = any;
type A3 = unknown;
type A4 = object;
type A5 = bigint;
type A6 = symbol;
type A7 = void;
type A8 = undefined;
type A9 = null;
type A10 = never;
type A11 = intrinsic;
class Foo {
foo(): this {
return this;
}
}
interface Foo1<T> {
foo: T;
bar?(a: number): void;
foo2: (...arg: any[]) => void;
}
interface Foo2 {}
interface Foo3 extends Foo1<number>, Foo2 {}
type B<T> = Foo1<T>;
interface Animal {
live(): void;
}
interface Dog extends Animal {
woof(): void;
}
type Example1 = Dog extends Animal ? number : string;
type Both = Animal | Dog;
type NameOrId<T extends number | string> = T extends number ? IdLabel
: NameLabel;
type MessageOf<T> = T extends { message: unknown } ? T["message"] : never;
type Flatten<T> = T extends any[] ? T[number] : T;
type Flatten<Type> = Type extends Array<infer Item> ? Item : Type;
type GetReturnType<Type> = Type extends (...args: never[]) => infer Return
? Return
: never;
type Num = GetReturnType<() => number>;
interface Lit<T extends string> {
foo: "foo";
b: true;
b2: false;
n: 1;
r: `foo${T}`;
}
type U = A | B & C;
type CreateMutable<Type> = {
-readonly [Property in keyof Type]: Type[Property];
};