@@ -199,7 +199,7 @@ describe( "A test for Culture Assessments", () => {
199199 const assessmentResult = assessor . getResult ( ) ;
200200 expect ( assessmentResult . getScore ( ) ) . toEqual ( 3 ) ;
201201 expect ( assessmentResult . getText ( ) ) . toEqual (
202- "Avoid using <i>first-world</i> as it is overgeneralizing. Consider using specific name for the country or region instead. " +
202+ "Avoid using <i>first-world</i> as it is overgeneralizing. Consider using the specific name for the country or region instead. " +
203203 "<a href='https://yoa.st/inclusive-language-culture' target='_blank'>Learn more.</a>"
204204 ) ;
205205 expect ( assessmentResult . hasMarks ( ) ) . toBeTruthy ( ) ;
@@ -209,6 +209,28 @@ describe( "A test for Culture Assessments", () => {
209209 original : "This sentence contains first-world." } } ]
210210 ) ;
211211 } ) ;
212+ it ( "correctly identifies 'first world countries'" , ( ) => {
213+ const mockPaper = new Paper ( "Many first world countries adopted the policy." ) ;
214+ const mockResearcher = Factory . buildMockResearcher ( [ "first world countries" ] ) ;
215+ const assessor = new InclusiveLanguageAssessment ( assessments . find ( obj => obj . identifier === "firstWorldCountries" ) ) ;
216+
217+ const isApplicable = assessor . isApplicable ( mockPaper , mockResearcher ) ;
218+
219+ expect ( isApplicable ) . toBeTruthy ( ) ;
220+ const assessmentResult = assessor . getResult ( ) ;
221+ expect ( assessmentResult . getScore ( ) ) . toEqual ( 3 ) ;
222+ expect ( assessmentResult . getText ( ) ) . toEqual (
223+ "Avoid using <i>first world countries</i> as it is overgeneralizing. " +
224+ "Consider using the specific name for the countries or regions instead. " +
225+ "<a href='https://yoa.st/inclusive-language-culture' target='_blank'>Learn more.</a>"
226+ ) ;
227+ expect ( assessmentResult . hasMarks ( ) ) . toBeTruthy ( ) ;
228+ expect ( assessor . getMarks ( ) ) . toEqual ( [ { _properties : {
229+ fieldsToMark : [ ] ,
230+ marked : "<yoastmark class='yoast-text-mark'>first world countries</yoastmark>" ,
231+ original : "first world countries" } } ]
232+ ) ;
233+ } ) ;
212234 it ( "correctly identifies 'third-world country'" , ( ) => {
213235 const mockPaper = new Paper ( "This sentence contains third-world country." ) ;
214236 const mockResearcher = Factory . buildMockResearcher ( [ "This sentence contains third-world country." ] ) ;
0 commit comments