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

261
Vistas
What is the name of the unit test naming convention that is prefixed with "#" and "." in the test names?

I've seen some tests written this way and I would like to know if anyone knows what is the name of this convention:

describe("users/domains/services/user-service", () => {
  describe("UserService", () => {
    describe(".create()", () => {
      ...
    });

   describe(".update()", () => {
      ...
   });
    
    // Static method
    describe("#new()", () => {
      ...
    });
  });
});

If someone can help me I would be very grateful.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

This way of referring to a method or variable comes from jsdoc and is called a namepath. For example, MyClass#myMethod could be used in a doc comment to refer the method named #myMethod in the class named MyClass.

The use of this convention for JavaScript tests is very prominent in the mocha.js documentation. An equivalent style has also been proposed by betterspecs.org as a best practice in Ruby, and there's some discussion about it there. I don't know who first adopted the style, and I don't think it has a name.

There's some more relevant answers in this related StackOverflow question.

about 4 years ago · Juan Pablo Isaza Denunciar
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