[gjs/wip/ptomato/tests: 6/10] coverage test: Fix copypasta errors
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/ptomato/tests: 6/10] coverage test: Fix copypasta errors
- Date: Mon, 28 Nov 2016 07:16:13 +0000 (UTC)
commit dff77ba71edfd3eec1da78c71bcead5e33cf7055
Author: Philip Chimento <philip chimento gmail com>
Date: Mon Oct 24 21:29:33 2016 -0700
coverage test: Fix copypasta errors
A few coverage tests didn't test what they said the tested. One was
identical to a test a few lines above. The other had a trailing newline
whereas the description said it was testing the case without a trailing
newline.
installed-tests/js/testCoverage.js | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/installed-tests/js/testCoverage.js b/installed-tests/js/testCoverage.js
index 19afbe3..7948074 100644
--- a/installed-tests/js/testCoverage.js
+++ b/installed-tests/js/testCoverage.js
@@ -252,11 +252,11 @@ function testExpressionLinesFoundForObjectPropertyArrayExpression() {
function testExpressionLinesFoundForObjectArgsToReturn() {
let foundLinesInsideObjectArgsToReturn =
- parseScriptForExpressionLines("var a = {\n" +
- " Name: {},\n" +
- "};\n");
+ parseScriptForExpressionLines("function f() {\n" +
+ " return {};\n" +
+ "}\n");
assertArrayEquals(foundLinesInsideObjectArgsToReturn,
- [1, 2],
+ [2],
JSUnit.assertEquals);
}
@@ -287,7 +287,7 @@ function functionDeclarationsEqual(actual, expected) {
function testFunctionsFoundNoTrailingNewline() {
let foundFuncs = parseScriptForFunctionNames("function f1() {}\n" +
- "function f2() {}\n");
+ "function f2() {}");
assertArrayEquals(foundFuncs,
[
{ key: "f1:1:0", line: 1, n_params: 0 },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]