Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

325
Views
TypeError: el argumento "título" de la suite debe ser una cadena. Tipo recibido "indefinido"

Estoy tratando de guardar datos en MongoDB, pero se está produciendo este error.

Estoy tratando de exportar la función de describe para guardar datos en MongoDB al hacer clic en el botón Completar. Además, ¿por qué la var app no se muestra en mi página cuando const demo = require en mi index.js? Creo que lo necesito para importar la función de describe . No se que pasa, por favor manda ayuda.

Este es mi index.js

 const demo = require("./demo_test") Survey .StylesManager .applyTheme("defaultV2"); const json = { pages: [ { questions: [ { type: "radiogroup", name: "Question 1", title: "Deliver through others.", choices: [ "Not effective", "Neither effective nor Effective", "Effective" ] }, { type: "radiogroup", name: "Question 2", title: "Understand others perspective.", choices: [ "Not effective", "Neither effective nor Effective", "Effective" ] }, { type: "radiogroup", name: "Question 3", title: "Solve complex problems.", choices: [ "Not effective", "Neither effective nor Effective", "Effective" ] }, ] } ] }; window.survey = new Survey.Model(json); survey .onComplete .add(function (sender) { let data = JSON.stringify(sender.data) data = data.replaceAll("Not effective", "A") data = data.replaceAll("Neither effective nor Effective", "B") data = data.replaceAll("Effective", "C") var obj = JSON.parse(data) document .querySelector('#surveyResult') .textContent = "Result JSON:\n" + JSON.stringify(obj, null, 3); describe(obj) }); var app = new Vue({ el: '#surveyElement', data: { survey: survey } });

este es mi demo_test.js

 const mocha = require('mocha') const { assert } = require('assert'); const Question = require('../models/questions'); describe('Saving records', function(obj){ it('Saves a record to the database', function(done){ var char = new Question({ obj }); char.save().then(function(){ assert(char.isNew === false); done(); }); }); }); module.exports = describe();
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!