update jsx tests
This commit is contained in:
parent
671196dffa
commit
6ef86f67f4
5
test/fixtures/jsx/basic/11/expected.json
vendored
5
test/fixtures/jsx/basic/11/expected.json
vendored
@ -136,13 +136,12 @@
|
||||
}
|
||||
},
|
||||
"value": "@test content",
|
||||
"rawValue": "@test content",
|
||||
"rawValue": null,
|
||||
"raw": "@test content"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
}
|
||||
5
test/fixtures/jsx/basic/12/expected.json
vendored
5
test/fixtures/jsx/basic/12/expected.json
vendored
@ -186,13 +186,12 @@
|
||||
}
|
||||
},
|
||||
"value": "7x invalid-js-identifier",
|
||||
"rawValue": "7x invalid-js-identifier",
|
||||
"rawValue": null,
|
||||
"raw": "7x invalid-js-identifier"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
}
|
||||
5
test/fixtures/jsx/basic/13/expected.json
vendored
5
test/fixtures/jsx/basic/13/expected.json
vendored
@ -276,7 +276,7 @@
|
||||
}
|
||||
},
|
||||
"value": "monkeys /> gorillas",
|
||||
"rawValue": "monkeys /> gorillas",
|
||||
"rawValue": null,
|
||||
"raw": "monkeys /> gorillas"
|
||||
}
|
||||
]
|
||||
@ -306,6 +306,5 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
}
|
||||
7
test/fixtures/jsx/basic/3/expected.json
vendored
7
test/fixtures/jsx/basic/3/expected.json
vendored
@ -217,7 +217,7 @@
|
||||
}
|
||||
},
|
||||
"value": " ",
|
||||
"rawValue": " ",
|
||||
"rawValue": null,
|
||||
"raw": " "
|
||||
},
|
||||
{
|
||||
@ -266,7 +266,7 @@
|
||||
}
|
||||
},
|
||||
"value": " ",
|
||||
"rawValue": " ",
|
||||
"rawValue": null,
|
||||
"raw": " "
|
||||
},
|
||||
{
|
||||
@ -404,6 +404,5 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
}
|
||||
5
test/fixtures/jsx/basic/7/expected.json
vendored
5
test/fixtures/jsx/basic/7/expected.json
vendored
@ -186,13 +186,12 @@
|
||||
}
|
||||
},
|
||||
"value": "\nbar\nbaz\n",
|
||||
"rawValue": "\nbar\nbaz\n",
|
||||
"rawValue": null,
|
||||
"raw": "\nbar\nbaz\n"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
}
|
||||
9
test/fixtures/jsx/regression/1/expected.json
vendored
9
test/fixtures/jsx/regression/1/expected.json
vendored
@ -136,7 +136,7 @@
|
||||
}
|
||||
},
|
||||
"value": "foo ",
|
||||
"rawValue": "foo ",
|
||||
"rawValue": null,
|
||||
"raw": "foo "
|
||||
},
|
||||
{
|
||||
@ -283,7 +283,7 @@
|
||||
}
|
||||
},
|
||||
"value": " bar",
|
||||
"rawValue": " bar",
|
||||
"rawValue": null,
|
||||
"raw": " bar"
|
||||
}
|
||||
]
|
||||
@ -303,13 +303,12 @@
|
||||
}
|
||||
},
|
||||
"value": " baz",
|
||||
"rawValue": " baz",
|
||||
"rawValue": null,
|
||||
"raw": " baz"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
}
|
||||
5
test/fixtures/jsx/regression/4/expected.json
vendored
5
test/fixtures/jsx/regression/4/expected.json
vendored
@ -136,13 +136,12 @@
|
||||
}
|
||||
},
|
||||
"value": "/text",
|
||||
"rawValue": "/text",
|
||||
"rawValue": null,
|
||||
"raw": "/text"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
}
|
||||
@ -52,13 +52,9 @@ function runTest(test) {
|
||||
if (opts.throws) {
|
||||
throw new Error("Expected error message: " + opts.throws + ". But parsing succeeded.");
|
||||
} else {
|
||||
try {
|
||||
var mis = misMatch(JSON.parse(test.expect.code), ast);
|
||||
} catch (err) {
|
||||
// save(test, ast);
|
||||
throw err;
|
||||
}
|
||||
var mis = misMatch(JSON.parse(test.expect.code), ast);
|
||||
if (mis) {
|
||||
// save(test, ast);
|
||||
throw new Error(mis);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user