title: TypeError [ERR_INVALID_ARG_TYPE]: The "urlObject" argument must be one of type object or string. Received type function ([Function])
body: <pre><code>const expect = require('chai').expect;
  const chaiHttp = require(&quot;chai-http&quot;);
  let chai = require('chai');
  const { post } = require('../server');
  //const describe = require('mocha').describe;
  // const { expect } = chai;
  chai.use(chaiHttp);
  
  describe('API endpoints', () =&gt; {
   let api 
  
  
  before(() =&gt; {
      console.log('setting up')
      api = server.listen(3000, 'localhost');
  });
  it('responds to /posts with status 200', done =&gt; {
      request(api)
          .post(post)
          .expect(200, done);
  });
  </code></pre>
  <p>code im testing in server.js</p>
  <pre><code>server.post(&quot;/posts&quot;, (req, res) =&gt; {
  const incomingRequest = req.body;
  if (isValidPost(incomingRequest)) {
   const post = {
    name: incomingRequest.name.toString(),
    content: incomingRequest.content.toString(),
    giph: incomingRequest.gif.toString(),
    date: new Date(),
    likes: 0,
    dislikes: 0,
    laughs: 0,
    comments: [],
    //id : database.length
   };
  </code></pre>
  <p>im trying to test a post request, however I'm not sure im doing it correctly so this is the error im receiving
  responds to /posts with status 200:
  TypeError [ERR_INVALID_ARG_TYPE]: The &quot;urlObject&quot; argument must be one of type object or string. Received type function ([Function])</p>