Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

98
Vistas
how to set undefined variable error in js for test cases
var editor;
return Backbone.Marionette.ItemView.extend({
      onShow:function(){
           editor=_.clone(ace);
            .................
      }
       enable:function(){
            edit.onPaste = editor.onPaste;
             ..............
      }
}

I am new to js Now i want to write a test case for the function enable. here editor is declared as global and is intialized in onshow function. i am getting editor as undefined in the test for enable function, how to resolve this. please help me Thank you.

The test case is like

it('Case #1:Check the enablerule Action function',function(){             
   expect(complexView.enableruleAction(view)).to.equal(undefined);
            });
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda