{"size": 423, "ext": "js", "max_stars_repo_path": "src/response/text.spec.js", "max_stars_repo_name": "ruben-nogueira/itty-router-extras", "max_stars_repo_stars_event_min_datetime": "2021-03-27T12:46:34.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T19:45:33.000Z", "max_issues_repo_path": "src/response/text.spec.js", "max_issues_repo_name": "ruben-nogueira/itty-router-extras", "max_issues_repo_issues_event_min_datetime": "2021-03-30T17:42:01.000Z", "max_issues_repo_issues_event_max_datetime": "2021-12-04T22:26:21.000Z", "max_forks_repo_path": "src/response/text.spec.js", "max_forks_repo_name": "ruben-nogueira/itty-router-extras", "max_forks_repo_forks_event_min_datetime": "2021-04-13T16:22:53.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-26T21:55:59.000Z"}
{"max_stars_count": 51, "max_issues_count": 12, "max_forks_count": 12, "avg_line_length": 23.5, "max_line_length": 60, "alphanum_fraction": 0.6241134752}
require('isomorphic-fetch')

const { text } = require('./text')

const message = 'Got it!'

describe('response/text', () => {
  describe(`text(content)`, () => {
    it('returns a text Response with content', async () => {
      const response = text(message)

      expect(response instanceof Response).toBe(true)
      expect(response.status).toBe(200)
      expect(await response.text()).toEqual(message)
    })
  })
})
