update tests. one still failing

pull/3539/head
Richard Harris 6 years ago
parent 37bac60313
commit 12d5126e32

@ -20,10 +20,30 @@
"type": "CallExpression",
"start": 21,
"end": 37,
"loc": {
"start": {
"line": 1,
"column": 21
},
"end": {
"line": 1,
"column": 37
}
},
"callee": {
"type": "Identifier",
"start": 21,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 21
},
"end": {
"line": 1,
"column": 22
}
},
"name": "t"
},
"arguments": [
@ -31,6 +51,16 @@
"type": "Literal",
"start": 23,
"end": 36,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 36
}
},
"value": "tooltip msg",
"raw": "'tooltip msg'"
}

@ -20,6 +20,16 @@
"type": "Literal",
"start": 21,
"end": 34,
"loc": {
"start": {
"line": 1,
"column": 21
},
"end": {
"line": 1,
"column": 34
}
},
"value": "tooltip msg",
"raw": "'tooltip msg'"
}

@ -12,6 +12,16 @@
"type": "Identifier",
"start": 7,
"end": 13,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 13
}
},
"name": "things"
},
"children": [
@ -51,6 +61,16 @@
"type": "Identifier",
"start": 24,
"end": 29,
"loc": {
"start": {
"line": 1,
"column": 24
},
"end": {
"line": 1,
"column": 29
}
},
"name": "thing"
}
}

@ -12,6 +12,16 @@
"type": "Identifier",
"start": 8,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 18
}
},
"name": "thePromise"
},
"value": "theValue",
@ -88,6 +98,16 @@
"type": "Identifier",
"start": 74,
"end": 82,
"loc": {
"start": {
"line": 4,
"column": 18
},
"end": {
"line": 4,
"column": 26
}
},
"name": "theValue"
}
}
@ -137,16 +157,46 @@
"type": "MemberExpression",
"start": 118,
"end": 134,
"loc": {
"start": {
"line": 6,
"column": 12
},
"end": {
"line": 6,
"column": 28
}
},
"object": {
"type": "Identifier",
"start": 118,
"end": 126,
"loc": {
"start": {
"line": 6,
"column": 12
},
"end": {
"line": 6,
"column": 20
}
},
"name": "theError"
},
"property": {
"type": "Identifier",
"start": 127,
"end": 134,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 28
}
},
"name": "message"
},
"computed": false

@ -44,20 +44,60 @@
"type": "Program",
"start": 8,
"end": 19,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"column": 0
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 10,
"end": 18,
"loc": {
"start": {
"line": 2,
"column": 1
},
"end": {
"line": 2,
"column": 9
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 14,
"end": 17,
"loc": {
"start": {
"line": 2,
"column": 5
},
"end": {
"line": 2,
"column": 8
}
},
"id": {
"type": "Identifier",
"start": 14,
"end": 17,
"loc": {
"start": {
"line": 2,
"column": 5
},
"end": {
"line": 2,
"column": 8
}
},
"name": "foo"
},
"init": null

@ -44,20 +44,60 @@
"type": "Program",
"start": 8,
"end": 20,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"column": 0
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 10,
"end": 19,
"loc": {
"start": {
"line": 2,
"column": 1
},
"end": {
"line": 2,
"column": 10
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 14,
"end": 18,
"loc": {
"start": {
"line": 2,
"column": 5
},
"end": {
"line": 2,
"column": 9
}
},
"id": {
"type": "Identifier",
"start": 14,
"end": 18,
"loc": {
"start": {
"line": 2,
"column": 5
},
"end": {
"line": 2,
"column": 9
}
},
"name": "name"
},
"init": null

@ -15,22 +15,62 @@
"type": "ConditionalExpression",
"start": 25,
"end": 40,
"loc": {
"start": {
"line": 1,
"column": 25
},
"end": {
"line": 1,
"column": 40
}
},
"test": {
"type": "Identifier",
"start": 25,
"end": 28,
"loc": {
"start": {
"line": 1,
"column": 25
},
"end": {
"line": 1,
"column": 28
}
},
"name": "foo"
},
"consequent": {
"type": "Identifier",
"start": 31,
"end": 34,
"loc": {
"start": {
"line": 1,
"column": 31
},
"end": {
"line": 1,
"column": 34
}
},
"name": "Foo"
},
"alternate": {
"type": "Identifier",
"start": 37,
"end": 40,
"loc": {
"start": {
"line": 1,
"column": 37
},
"end": {
"line": 1,
"column": 40
}
},
"name": "Bar"
}
}

@ -14,26 +14,76 @@
"type": "Program",
"start": 8,
"end": 137,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 9,
"column": 0
}
},
"body": [
{
"type": "ImportDeclaration",
"start": 10,
"end": 43,
"loc": {
"start": {
"line": 2,
"column": 1
},
"end": {
"line": 2,
"column": 34
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 19,
"end": 26,
"loc": {
"start": {
"line": 2,
"column": 10
},
"end": {
"line": 2,
"column": 17
}
},
"imported": {
"type": "Identifier",
"start": 19,
"end": 26,
"loc": {
"start": {
"line": 2,
"column": 10
},
"end": {
"line": 2,
"column": 17
}
},
"name": "onMount"
},
"local": {
"type": "Identifier",
"start": 19,
"end": 26,
"loc": {
"start": {
"line": 2,
"column": 10
},
"end": {
"line": 2,
"column": 17
}
},
"name": "onMount"
}
}
@ -42,6 +92,16 @@
"type": "Literal",
"start": 34,
"end": 42,
"loc": {
"start": {
"line": 2,
"column": 25
},
"end": {
"line": 2,
"column": 33
}
},
"value": "svelte",
"raw": "'svelte'"
}
@ -50,14 +110,44 @@
"type": "ExpressionStatement",
"start": 46,
"end": 136,
"loc": {
"start": {
"line": 4,
"column": 1
},
"end": {
"line": 8,
"column": 4
}
},
"expression": {
"type": "CallExpression",
"start": 46,
"end": 135,
"loc": {
"start": {
"line": 4,
"column": 1
},
"end": {
"line": 8,
"column": 3
}
},
"callee": {
"type": "Identifier",
"start": 46,
"end": 53,
"loc": {
"start": {
"line": 4,
"column": 1
},
"end": {
"line": 4,
"column": 8
}
},
"name": "onMount"
},
"arguments": [
@ -65,6 +155,16 @@
"type": "ArrowFunctionExpression",
"start": 54,
"end": 134,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 8,
"column": 2
}
},
"id": null,
"expression": false,
"generator": false,
@ -74,27 +174,87 @@
"type": "BlockStatement",
"start": 60,
"end": 134,
"loc": {
"start": {
"line": 4,
"column": 15
},
"end": {
"line": 8,
"column": 2
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 64,
"end": 131,
"loc": {
"start": {
"line": 5,
"column": 2
},
"end": {
"line": 7,
"column": 5
}
},
"expression": {
"type": "CallExpression",
"start": 64,
"end": 130,
"loc": {
"start": {
"line": 5,
"column": 2
},
"end": {
"line": 7,
"column": 4
}
},
"callee": {
"type": "MemberExpression",
"start": 64,
"end": 87,
"loc": {
"start": {
"line": 5,
"column": 2
},
"end": {
"line": 5,
"column": 25
}
},
"object": {
"type": "ImportExpression",
"start": 64,
"end": 82,
"loc": {
"start": {
"line": 5,
"column": 2
},
"end": {
"line": 5,
"column": 20
}
},
"source": {
"type": "Literal",
"start": 71,
"end": 81,
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 19
}
},
"value": "./foo.js",
"raw": "'./foo.js'"
}
@ -103,6 +263,16 @@
"type": "Identifier",
"start": 83,
"end": 87,
"loc": {
"start": {
"line": 5,
"column": 21
},
"end": {
"line": 5,
"column": 25
}
},
"name": "then"
},
"computed": false
@ -112,6 +282,16 @@
"type": "ArrowFunctionExpression",
"start": 88,
"end": 129,
"loc": {
"start": {
"line": 5,
"column": 26
},
"end": {
"line": 7,
"column": 3
}
},
"id": null,
"expression": false,
"generator": false,
@ -121,6 +301,16 @@
"type": "Identifier",
"start": 88,
"end": 91,
"loc": {
"start": {
"line": 5,
"column": 26
},
"end": {
"line": 5,
"column": 29
}
},
"name": "foo"
}
],
@ -128,29 +318,89 @@
"type": "BlockStatement",
"start": 95,
"end": 129,
"loc": {
"start": {
"line": 5,
"column": 33
},
"end": {
"line": 7,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 100,
"end": 125,
"loc": {
"start": {
"line": 6,
"column": 3
},
"end": {
"line": 6,
"column": 28
}
},
"expression": {
"type": "CallExpression",
"start": 100,
"end": 124,
"loc": {
"start": {
"line": 6,
"column": 3
},
"end": {
"line": 6,
"column": 27
}
},
"callee": {
"type": "MemberExpression",
"start": 100,
"end": 111,
"loc": {
"start": {
"line": 6,
"column": 3
},
"end": {
"line": 6,
"column": 14
}
},
"object": {
"type": "Identifier",
"start": 100,
"end": 107,
"loc": {
"start": {
"line": 6,
"column": 3
},
"end": {
"line": 6,
"column": 10
}
},
"name": "console"
},
"property": {
"type": "Identifier",
"start": 108,
"end": 111,
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 14
}
},
"name": "log"
},
"computed": false
@ -160,16 +410,46 @@
"type": "MemberExpression",
"start": 112,
"end": 123,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 6,
"column": 26
}
},
"object": {
"type": "Identifier",
"start": 112,
"end": 115,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 6,
"column": 18
}
},
"name": "foo"
},
"property": {
"type": "Identifier",
"start": 116,
"end": 123,
"loc": {
"start": {
"line": 6,
"column": 19
},
"end": {
"line": 6,
"column": 26
}
},
"name": "default"
},
"computed": false

@ -12,6 +12,16 @@
"type": "Identifier",
"start": 7,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 14
}
},
"name": "animals"
},
"children": [

@ -12,6 +12,16 @@
"type": "Identifier",
"start": 7,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 14
}
},
"name": "animals"
},
"children": [

@ -12,6 +12,16 @@
"type": "Identifier",
"start": 7,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 14
}
},
"name": "animals"
},
"children": [

@ -12,6 +12,16 @@
"type": "Identifier",
"start": 7,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 12
}
},
"name": "todos"
},
"children": [
@ -46,16 +56,46 @@
"type": "MemberExpression",
"start": 22,
"end": 29,
"loc": {
"start": {
"line": 1,
"column": 22
},
"end": {
"line": 1,
"column": 29
}
},
"object": {
"type": "Identifier",
"start": 22,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 22
},
"end": {
"line": 1,
"column": 26
}
},
"name": "todo"
},
"property": {
"type": "Identifier",
"start": 27,
"end": 29,
"loc": {
"start": {
"line": 1,
"column": 27
},
"end": {
"line": 1,
"column": 29
}
},
"name": "id"
},
"computed": false

@ -12,6 +12,16 @@
"type": "Identifier",
"start": 7,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 14
}
},
"name": "animals"
},
"children": [

@ -20,6 +20,16 @@
"type": "ArrowFunctionExpression",
"start": 19,
"end": 43,
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 43
}
},
"id": null,
"expression": true,
"generator": false,
@ -29,23 +39,63 @@
"type": "AssignmentExpression",
"start": 25,
"end": 43,
"loc": {
"start": {
"line": 1,
"column": 25
},
"end": {
"line": 1,
"column": 43
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 25,
"end": 32,
"loc": {
"start": {
"line": 1,
"column": 25
},
"end": {
"line": 1,
"column": 32
}
},
"name": "visible"
},
"right": {
"type": "UnaryExpression",
"start": 35,
"end": 43,
"loc": {
"start": {
"line": 1,
"column": 35
},
"end": {
"line": 1,
"column": 43
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 36,
"end": 43,
"loc": {
"start": {
"line": 1,
"column": 36
},
"end": {
"line": 1,
"column": 43
}
},
"name": "visible"
}
}

@ -12,10 +12,30 @@
"type": "BinaryExpression",
"start": 5,
"end": 11,
"loc": {
"start": {
"line": 1,
"column": 5
},
"end": {
"line": 1,
"column": 11
}
},
"left": {
"type": "Identifier",
"start": 5,
"end": 6,
"loc": {
"start": {
"line": 1,
"column": 5
},
"end": {
"line": 1,
"column": 6
}
},
"name": "x"
},
"operator": ">",
@ -23,6 +43,16 @@
"type": "Literal",
"start": 9,
"end": 11,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 11
}
},
"value": 10,
"raw": "10"
}
@ -59,10 +89,30 @@
"type": "BinaryExpression",
"start": 52,
"end": 57,
"loc": {
"start": {
"line": 3,
"column": 10
},
"end": {
"line": 3,
"column": 15
}
},
"left": {
"type": "Identifier",
"start": 52,
"end": 53,
"loc": {
"start": {
"line": 3,
"column": 10
},
"end": {
"line": 3,
"column": 11
}
},
"name": "x"
},
"operator": "<",
@ -70,6 +120,16 @@
"type": "Literal",
"start": 56,
"end": 57,
"loc": {
"start": {
"line": 3,
"column": 14
},
"end": {
"line": 3,
"column": 15
}
},
"value": 5,
"raw": "5"
}

@ -26,6 +26,16 @@
"type": "Identifier",
"start": 11,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 11
},
"end": {
"line": 1,
"column": 15
}
},
"name": "raw1"
}
},
@ -44,6 +54,16 @@
"type": "Identifier",
"start": 24,
"end": 28,
"loc": {
"start": {
"line": 1,
"column": 24
},
"end": {
"line": 1,
"column": 28
}
},
"name": "raw2"
}
},

@ -44,20 +44,60 @@
"type": "Program",
"start": 8,
"end": 19,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"column": 0
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 10,
"end": 18,
"loc": {
"start": {
"line": 2,
"column": 1
},
"end": {
"line": 2,
"column": 9
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 14,
"end": 17,
"loc": {
"start": {
"line": 2,
"column": 5
},
"end": {
"line": 2,
"column": 8
}
},
"id": {
"type": "Identifier",
"start": 14,
"end": 17,
"loc": {
"start": {
"line": 2,
"column": 5
},
"end": {
"line": 2,
"column": 8
}
},
"name": "foo"
},
"init": null

@ -30,6 +30,16 @@
"type": "Program",
"start": 8,
"end": 34,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"column": 0
}
},
"body": [],
"sourceType": "module"
}

@ -56,26 +56,76 @@
"type": "Program",
"start": 8,
"end": 68,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 7,
"column": 0
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 10,
"end": 29,
"loc": {
"start": {
"line": 2,
"column": 1
},
"end": {
"line": 2,
"column": 20
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 14,
"end": 28,
"loc": {
"start": {
"line": 2,
"column": 5
},
"end": {
"line": 2,
"column": 19
}
},
"id": {
"type": "Identifier",
"start": 14,
"end": 18,
"loc": {
"start": {
"line": 2,
"column": 5
},
"end": {
"line": 2,
"column": 9
}
},
"name": "name"
},
"init": {
"type": "Literal",
"start": 21,
"end": 28,
"loc": {
"start": {
"line": 2,
"column": 12
},
"end": {
"line": 2,
"column": 19
}
},
"value": "world",
"raw": "'world'"
}

@ -56,26 +56,76 @@
"type": "Program",
"start": 8,
"end": 57,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 5,
"column": 0
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 10,
"end": 29,
"loc": {
"start": {
"line": 2,
"column": 1
},
"end": {
"line": 2,
"column": 20
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 14,
"end": 28,
"loc": {
"start": {
"line": 2,
"column": 5
},
"end": {
"line": 2,
"column": 19
}
},
"id": {
"type": "Identifier",
"start": 14,
"end": 18,
"loc": {
"start": {
"line": 2,
"column": 5
},
"end": {
"line": 2,
"column": 9
}
},
"name": "name"
},
"init": {
"type": "Literal",
"start": 21,
"end": 28,
"loc": {
"start": {
"line": 2,
"column": 12
},
"end": {
"line": 2,
"column": 19
}
},
"value": "world",
"raw": "'world'"
}

@ -56,26 +56,76 @@
"type": "Program",
"start": 8,
"end": 30,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"column": 0
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 10,
"end": 29,
"loc": {
"start": {
"line": 2,
"column": 1
},
"end": {
"line": 2,
"column": 20
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 14,
"end": 28,
"loc": {
"start": {
"line": 2,
"column": 5
},
"end": {
"line": 2,
"column": 19
}
},
"id": {
"type": "Identifier",
"start": 14,
"end": 18,
"loc": {
"start": {
"line": 2,
"column": 5
},
"end": {
"line": 2,
"column": 9
}
},
"name": "name"
},
"init": {
"type": "Literal",
"start": 21,
"end": 28,
"loc": {
"start": {
"line": 2,
"column": 12
},
"end": {
"line": 2,
"column": 19
}
},
"value": "world",
"raw": "'world'"
}

@ -12,10 +12,30 @@
"type": "BinaryExpression",
"start": 5,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 5
},
"end": {
"line": 1,
"column": 14
}
},
"left": {
"type": "Identifier",
"start": 5,
"end": 10,
"loc": {
"start": {
"line": 1,
"column": 5
},
"end": {
"line": 1,
"column": 10
}
},
"name": "depth"
},
"operator": ">",
@ -23,6 +43,16 @@
"type": "Literal",
"start": 13,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 13
},
"end": {
"line": 1,
"column": 14
}
},
"value": 1,
"raw": "1"
}
@ -48,10 +78,30 @@
"type": "BinaryExpression",
"start": 38,
"end": 47,
"loc": {
"start": {
"line": 2,
"column": 22
},
"end": {
"line": 2,
"column": 31
}
},
"left": {
"type": "Identifier",
"start": 38,
"end": 43,
"loc": {
"start": {
"line": 2,
"column": 22
},
"end": {
"line": 2,
"column": 27
}
},
"name": "depth"
},
"operator": "-",
@ -59,6 +109,16 @@
"type": "Literal",
"start": 46,
"end": 47,
"loc": {
"start": {
"line": 2,
"column": 30
},
"end": {
"line": 2,
"column": 31
}
},
"value": 1,
"raw": "1"
}

@ -20,11 +20,31 @@
"type": "ObjectExpression",
"start": 16,
"end": 28,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 28
}
},
"properties": [
{
"type": "Property",
"start": 17,
"end": 27,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 27
}
},
"method": false,
"shorthand": false,
"computed": false,
@ -32,12 +52,32 @@
"type": "Identifier",
"start": 17,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 24
}
},
"name": "opacity"
},
"value": {
"type": "Literal",
"start": 26,
"end": 27,
"loc": {
"start": {
"line": 1,
"column": 26
},
"end": {
"line": 1,
"column": 27
}
},
"value": 0,
"raw": "0"
},

@ -12,6 +12,16 @@
"type": "Identifier",
"start": 7,
"end": 13,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 13
}
},
"name": "things"
},
"children": [
@ -30,6 +40,16 @@
"type": "Identifier",
"start": 26,
"end": 28,
"loc": {
"start": {
"line": 2,
"column": 5
},
"end": {
"line": 2,
"column": 7
}
},
"name": "𐊧"
}
}

@ -5,7 +5,7 @@ import { svelte } from "../helpers.js";
import { SourceMapConsumer } from "source-map";
import { getLocator } from "locate-character";
describe.only("sourcemaps", () => {
describe("sourcemaps", () => {
fs.readdirSync("test/sourcemaps/samples").forEach(dir => {
if (dir[0] === ".") return;

Loading…
Cancel
Save