@@ -276,7 +276,8 @@ describe('Compile', function () {
276276 twoWayWarn : null ,
277277 testOneTime : null ,
278278 optimizeLiteral : null ,
279- optimizeLiteralStr : null
279+ optimizeLiteralStr : null ,
280+ literalWithFilter : null
280281 }
281282 el . innerHTML = '<div ' +
282283 'v-bind:test-normal="a" ' +
@@ -286,9 +287,13 @@ describe('Compile', function () {
286287 ':optimize-literal-str="\'true\'"' +
287288 ':test-two-way.sync="a" ' +
288289 ':two-way-warn.sync="a + 1" ' +
289- ':test-one-time.once="a"></div>'
290+ ':test-one-time.once="a" ' +
291+ ':literal-with-filter="\'HI\' | lowercase"' +
292+ '></div>'
290293 compiler . compileAndLinkProps ( vm , el . firstChild , props )
291- expect ( vm . _bindDir . calls . count ( ) ) . toBe ( 3 ) // skip literal and one time
294+ // check bindDir calls:
295+ // skip literal and one time, but not literal with filter
296+ expect ( vm . _bindDir . calls . count ( ) ) . toBe ( 4 )
292297 // literal
293298 expect ( vm . testLiteral ) . toBe ( '1' )
294299 expect ( vm . _data . testLiteral ) . toBe ( '1' )
@@ -317,6 +322,14 @@ describe('Compile', function () {
317322 expect ( prop . mode ) . toBe ( bindingModes . TWO_WAY )
318323 // two way warn
319324 expect ( hasWarned ( 'non-settable parent path' ) ) . toBe ( true )
325+ // literal with filter
326+ args = vm . _bindDir . calls . argsFor ( 3 )
327+ prop = args [ 0 ] . prop
328+ expect ( args [ 0 ] . name ) . toBe ( 'prop' )
329+ expect ( prop . path ) . toBe ( 'literalWithFilter' )
330+ expect ( prop . parentPath ) . toBe ( "'HI'" )
331+ expect ( prop . filters . length ) . toBe ( 1 )
332+ expect ( prop . mode ) . toBe ( bindingModes . ONE_WAY )
320333 } )
321334
322335 it ( 'props on root instance' , function ( ) {
0 commit comments