55const rule = require ( '../../../lib/rules/require-return-from-computed' ) ;
66const RuleTester = require ( 'eslint' ) . RuleTester ;
77
8+ const { ERROR_MESSAGE } = rule ;
9+
810// ------------------------------------------------------------------------------
911// Tests
1012// ------------------------------------------------------------------------------
@@ -40,7 +42,8 @@ eslintTester.run('require-return-from-computed', rule, {
4042 output : null ,
4143 errors : [
4244 {
43- message : 'Always return a value from computed properties' ,
45+ message : ERROR_MESSAGE ,
46+ type : 'FunctionExpression' ,
4447 } ,
4548 ] ,
4649 } ,
@@ -49,7 +52,8 @@ eslintTester.run('require-return-from-computed', rule, {
4952 output : null ,
5053 errors : [
5154 {
52- message : 'Always return a value from computed properties' ,
55+ message : ERROR_MESSAGE ,
56+ type : 'FunctionExpression' ,
5357 } ,
5458 ] ,
5559 } ,
@@ -58,10 +62,12 @@ eslintTester.run('require-return-from-computed', rule, {
5862 output : null ,
5963 errors : [
6064 {
61- message : 'Always return a value from computed properties' ,
65+ message : ERROR_MESSAGE ,
66+ type : 'FunctionExpression' ,
6267 } ,
6368 {
64- message : 'Always return a value from computed properties' ,
69+ message : ERROR_MESSAGE ,
70+ type : 'FunctionExpression' ,
6571 } ,
6672 ] ,
6773 } ,
@@ -70,7 +76,8 @@ eslintTester.run('require-return-from-computed', rule, {
7076 output : null ,
7177 errors : [
7278 {
73- message : 'Always return a value from computed properties' ,
79+ message : ERROR_MESSAGE ,
80+ type : 'FunctionExpression' ,
7481 } ,
7582 ] ,
7683 } ,
@@ -79,7 +86,8 @@ eslintTester.run('require-return-from-computed', rule, {
7986 output : null ,
8087 errors : [
8188 {
82- message : 'Always return a value from computed properties' ,
89+ message : ERROR_MESSAGE ,
90+ type : 'FunctionExpression' ,
8391 } ,
8492 ] ,
8593 } ,
0 commit comments