Last active
March 25, 2021 16:17
-
-
Save leepfrog/5073459 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require '../../test_helper.coffee' | |
| describe 'ArrayPipeline', -> | |
| describe '#_setupPlugin()', -> | |
| it 'should instantiate a plugin from a constant', -> | |
| pipeline = Em.ArrayProxy.createWithMixins(Em.ArrayPipelineMixin,{}) | |
| pipeline.get('_processors.length').should.equal(0) | |
| pipeline._setupPlugin(Em.PipePlugin) | |
| pipeline.get('_processors.length').should.equal(1) | |
| pipeline.get('_processors.firstObject').should.be.instanceof(Em.PipePlugin) | |
| it 'should instantiate a plugin from a string', -> | |
| pipeline = Em.ArrayProxy.createWithMixins(Em.ArrayPipelineMixin,{}) | |
| pipeline.get('_processors.length').should.equal(0) | |
| pipeline._setupPlugin('Em.PipePlugin') | |
| pipeline.get('_processors.length').should.equal(1) | |
| pipeline.get('_processors.firstObject').should.be.instanceof(Em.PipePlugin) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Ember.ArrayPipelineMixin = Ember.Mixin.create | |
| # This is our result output from the ArrayPipeline | |
| results: [] | |
| # This is our array of plugins to use | |
| plugins: [] | |
| # This is our array of instantiated plugins to actually use for processing | |
| # @private | |
| _processors: [] |
Author
Author
Nevermind.. brainfart.. :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the problem is, line #9 works correctly... line #16 doesn't work correctly (there's an object in the array)...