diff --git a/packages/yoastseo/spec/fullTextTests/testTexts/ar/arabicPaper.js b/packages/yoastseo/spec/fullTextTests/testTexts/ar/arabicPaper.js index 425932b41a8..d79b329e2a6 100644 --- a/packages/yoastseo/spec/fullTextTests/testTexts/ar/arabicPaper.js +++ b/packages/yoastseo/spec/fullTextTests/testTexts/ar/arabicPaper.js @@ -112,7 +112,7 @@ const expectedResults = { textParagraphTooLong: { isApplicable: true, score: 9, - resultText: "Paragraph length: None of the paragraphs are too long. Great job!", + resultText: "Paragraph length: There are no paragraphs that are too long. Great job!", }, textSentenceLength: { isApplicable: true, diff --git a/packages/yoastseo/spec/fullTextTests/testTexts/de/germanPaper.js b/packages/yoastseo/spec/fullTextTests/testTexts/de/germanPaper.js index 3314cb82141..a054ad05097 100644 --- a/packages/yoastseo/spec/fullTextTests/testTexts/de/germanPaper.js +++ b/packages/yoastseo/spec/fullTextTests/testTexts/de/germanPaper.js @@ -115,7 +115,7 @@ const expectedResults = { textParagraphTooLong: { isApplicable: true, score: 9, - resultText: "Paragraph length: None of the paragraphs are too long. " + + resultText: "Paragraph length: There are no paragraphs that are too long. " + "Great job!", }, textSentenceLength: { diff --git a/packages/yoastseo/spec/fullTextTests/testTexts/en/englishPaper.js b/packages/yoastseo/spec/fullTextTests/testTexts/en/englishPaper.js index 8d4b2d3ba19..25c93a79385 100644 --- a/packages/yoastseo/spec/fullTextTests/testTexts/en/englishPaper.js +++ b/packages/yoastseo/spec/fullTextTests/testTexts/en/englishPaper.js @@ -112,7 +112,7 @@ const expectedResults = { textParagraphTooLong: { isApplicable: true, score: 9, - resultText: "Paragraph length: None of the paragraphs are too long. Great job!", + resultText: "Paragraph length: There are no paragraphs that are too long. Great job!", }, textSentenceLength: { isApplicable: true, diff --git a/packages/yoastseo/spec/fullTextTests/testTexts/hu/hungarianPaper.js b/packages/yoastseo/spec/fullTextTests/testTexts/hu/hungarianPaper.js index 6fd5beeef3f..db239192f14 100644 --- a/packages/yoastseo/spec/fullTextTests/testTexts/hu/hungarianPaper.js +++ b/packages/yoastseo/spec/fullTextTests/testTexts/hu/hungarianPaper.js @@ -112,7 +112,7 @@ const expectedResults = { textParagraphTooLong: { isApplicable: true, score: 9, - resultText: "Paragraph length: None of the paragraphs are too long. Great job!", + resultText: "Paragraph length: There are no paragraphs that are too long. Great job!", }, textSentenceLength: { isApplicable: true, diff --git a/packages/yoastseo/spec/fullTextTests/testTexts/nb/norwegianPaper.js b/packages/yoastseo/spec/fullTextTests/testTexts/nb/norwegianPaper.js index 5429eee77c7..cab6dd4ebb8 100644 --- a/packages/yoastseo/spec/fullTextTests/testTexts/nb/norwegianPaper.js +++ b/packages/yoastseo/spec/fullTextTests/testTexts/nb/norwegianPaper.js @@ -112,7 +112,7 @@ const expectedResults = { textParagraphTooLong: { isApplicable: true, score: 9, - resultText: "Paragraph length: None of the paragraphs are too long. Great job!", + resultText: "Paragraph length: There are no paragraphs that are too long. Great job!", }, textSentenceLength: { isApplicable: true, diff --git a/packages/yoastseo/spec/fullTextTests/testTexts/nl/dutchPaper.js b/packages/yoastseo/spec/fullTextTests/testTexts/nl/dutchPaper.js index 382800b7521..d4a51a72336 100644 --- a/packages/yoastseo/spec/fullTextTests/testTexts/nl/dutchPaper.js +++ b/packages/yoastseo/spec/fullTextTests/testTexts/nl/dutchPaper.js @@ -110,7 +110,7 @@ const expectedResults = { textParagraphTooLong: { isApplicable: true, score: 9, - resultText: "Paragraph length: None of the paragraphs are too long. Great job!", + resultText: "Paragraph length: There are no paragraphs that are too long. Great job!", }, textSentenceLength: { isApplicable: true, diff --git a/packages/yoastseo/spec/fullTextTests/testTexts/pl/polishPaper.js b/packages/yoastseo/spec/fullTextTests/testTexts/pl/polishPaper.js index b0d8408ed8e..81c232939a6 100644 --- a/packages/yoastseo/spec/fullTextTests/testTexts/pl/polishPaper.js +++ b/packages/yoastseo/spec/fullTextTests/testTexts/pl/polishPaper.js @@ -104,7 +104,7 @@ const expectedResults = { textParagraphTooLong: { isApplicable: true, score: 9, - resultText: "Paragraph length: None of the paragraphs are too long. Great job!", + resultText: "Paragraph length: There are no paragraphs that are too long. Great job!", }, textSentenceLength: { isApplicable: true, diff --git a/packages/yoastseo/spec/fullTextTests/testTexts/sk/slovakPaper.js b/packages/yoastseo/spec/fullTextTests/testTexts/sk/slovakPaper.js index 99449c56617..1bc0b77b32f 100644 --- a/packages/yoastseo/spec/fullTextTests/testTexts/sk/slovakPaper.js +++ b/packages/yoastseo/spec/fullTextTests/testTexts/sk/slovakPaper.js @@ -111,7 +111,7 @@ const expectedResults = { textParagraphTooLong: { isApplicable: true, score: 9, - resultText: "Paragraph length: None of the paragraphs are too long. Great job!", + resultText: "Paragraph length: There are no paragraphs that are too long. Great job!", }, textSentenceLength: { isApplicable: true, diff --git a/packages/yoastseo/spec/fullTextTests/testTexts/sv/swedishPaper.js b/packages/yoastseo/spec/fullTextTests/testTexts/sv/swedishPaper.js index 9ed8170dad5..0fb8bc07962 100644 --- a/packages/yoastseo/spec/fullTextTests/testTexts/sv/swedishPaper.js +++ b/packages/yoastseo/spec/fullTextTests/testTexts/sv/swedishPaper.js @@ -101,7 +101,7 @@ const expectedResults = { textParagraphTooLong: { isApplicable: true, score: 9, - resultText: "Paragraph length: None of the paragraphs are too long. Great job!", + resultText: "Paragraph length: There are no paragraphs that are too long. Great job!", }, textSentenceLength: { isApplicable: true, diff --git a/packages/yoastseo/spec/fullTextTests/testTexts/tr/turkishPaper.js b/packages/yoastseo/spec/fullTextTests/testTexts/tr/turkishPaper.js index 2c69af16c1e..63bc8b6a7b1 100644 --- a/packages/yoastseo/spec/fullTextTests/testTexts/tr/turkishPaper.js +++ b/packages/yoastseo/spec/fullTextTests/testTexts/tr/turkishPaper.js @@ -103,7 +103,7 @@ const expectedResults = { textParagraphTooLong: { isApplicable: true, score: 9, - resultText: "Paragraph length: None of the paragraphs are too long. Great job!", + resultText: "Paragraph length: There are no paragraphs that are too long. Great job!", }, textSentenceLength: { isApplicable: true, @@ -111,8 +111,9 @@ const expectedResults = { resultText: "Sentence length: Great!", }, textTransitionWords: { - // This assessment is not applicable to this paper as the text contains less than 200 words. - isApplicable: false, + isApplicable: true, + score: 9, + resultText: "Transition words: Well done!", }, passiveVoice: { isApplicable: true, diff --git a/packages/yoastseo/spec/scoring/assessments/readability/ListAssessmentSpec.js b/packages/yoastseo/spec/scoring/assessments/readability/ListAssessmentSpec.js index c999d48b070..e6cd31eaa61 100644 --- a/packages/yoastseo/spec/scoring/assessments/readability/ListAssessmentSpec.js +++ b/packages/yoastseo/spec/scoring/assessments/readability/ListAssessmentSpec.js @@ -6,7 +6,7 @@ import buildTree from "../../../specHelpers/parse/buildTree"; const listAssessment = new ListAssessment(); describe( "a test for an assessment that checks whether a paper contains a list or not", function() { - it( "assesses when there are no lists", function() { + it( "returns a bad score when there are no lists", function() { const mockPaper = new Paper( "text with no list" ); const mockResearcher = new EnglishResearcher( mockPaper ); buildTree( mockPaper, mockResearcher ); @@ -17,6 +17,17 @@ describe( "a test for an assessment that checks whether a paper contains a list expect( assessment.getText() ).toEqual( "Lists: " + "No lists appear on this page. Add at least one ordered or unordered list!" ); } ); + it( "returns a bad score when there are is no text", function() { + const mockPaper = new Paper( "" ); + const mockResearcher = new EnglishResearcher( mockPaper ); + buildTree( mockPaper, mockResearcher ); + + const assessment = listAssessment.getResult( mockPaper ); + + expect( assessment.getScore() ).toEqual( 3 ); + expect( assessment.getText() ).toEqual( "Lists: " + + "No lists appear on this page. Add at least one ordered or unordered list!" ); + } ); it( "assesses when there is a list inside an element we want to exclude from the analysis", function() { const mockPaper = new Paper( "
These are the most important things in life:\n" + "