Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6361171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:44:30+00:00 2026-05-24T23:44:30+00:00

I could really do with some advice on testing a RESTful api I created

  • 0

I could really do with some advice on testing a RESTful api I created in node.js. There are a plethora of frameworks out there and I am at a loss. My testing knowledge isn’t good enough generally which is why I am trying to write these tests. I’ve tried vows.js which seems nice but I couldn’t work out how to incorporate the testing of my API, I need some sort of client. An example of a simple post to test a login system is all I need to get going.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:44:31+00:00Added an answer on May 24, 2026 at 11:44 pm

    Update 6 months later

    vows-is sucks. use mocha

    Original

    Updated with vow-is code

    Here’s the vows-is example from the vows-is examples folder.

    // simple HTTP
    // Run with node example/simple-http.js
    
    var express = require("express");
        is = require("../src/vows-is.js");
    
    is.config({
        "server": {
            "factory": function _factory(cb) {
                var app = express.createServer();
    
                app.get("/", function(req, res) {
                    res.send("hello world");
                })
    
                app.listen(3000);
    
                cb(app);
            },
            "uri": "http://localhost:3000",
            "kill": function _kill(app) {
                app.close();
            }
        }
    });
    
    is.suite("http request test").batch()
    
        .context("a request to GET /")
            .topic.is.a.request("GET /")
            .vow.it.should.have.status(200)
            .vow.it.should.have
                .header("content-type", "text/html; charset=utf-8")
            .context("contains a body that")
                .topic.is.property('body')
                .vow.it.should.be.ok
                .vow.it.should.include.string("hello world")
    
    .suite().run({
        reporter: is.reporter
    }, function() {
        console.log("finished");
        is.end();
    })
    

    This uses vows-is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've inherited a rather large application that really could use some cleanup. There is
I could really do with some advice here. I'm new to Django, but understand
All, We could really do with some advice from SVG gurus. WHAT WE HAVE:
Please could I ask for some advice on a control flow issue with node
I have a dilemma, and I could really use some advice. I am building
I'm not a software person, but I could really use some advice. I'm writing
This seems to be an overlooked area that could really use some insight. What
I've been fighting this problem for many hours now and could really use some
I'm writing some code which could really do with some simple compile time metaprogramming.
I have a piece of code here that i really could use some help

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.