Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

370
Visualizações
Getting Error: uuid is not declared configurable while using jasmine

I am getting an error while spying using jasmine and typescript for an angular project.

Here is my code:

import * as utils from 'app/shared/utils';

it('sample test',
fakeAsync(() => {
  const uuidFunc = jasmine.createSpy('uuid').and.returnValue('12345');
  spyOnProperty(utils, 'uuid', 'get').and.returnValue(uuidFunc);
  ......

Here is the error that I am getting:

Error: uuid is not declared configurable

The uuid function:

export function uuid(): string {
   const bytes = new Uint32Array(4);
   return bytes;
 }

This was working till Angular 8 and I have upgraded to Angular 9 and it has started complaining

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda