This package has been deprecated

Author message:

please use @nuxt/test-utils. https://test-utils.nuxtjs.org/

@nuxtjs/module-test-utils
TypeScript icon, indicating that this package has built-in type declarations

1.6.3 • Public • Published

@nuxtjs/module-test-utils

npm version npm downloads Circle CI Codecov License

Test utilities for modules Nuxt.js

📖 Release Notes

Setup

Add @nuxtjs/module-test-utils dependency to your project

yarn add --dev @nuxtjs/module-test-utils # or npm install --save-dev @nuxtjs/module-test-utils

Usage

const { setup, loadConfig, get } = require('@nuxtjs/module-test-utils')

describe('basic', () => {
  let nuxt

  beforeAll(async () => {
    ({ nuxt } = await setup(loadConfig(__dirname)))
  }, 60000)

  afterAll(async () => {
    await nuxt.close()
  })

  test('render', async () => {
    const html = await get('/')
    expect(html).toContain('Works!')
  })
})

License

MIT License

Copyright (c) - Nuxt Community

Readme

Keywords

none

Package Sidebar

Install

npm i @nuxtjs/module-test-utils

Weekly Downloads

520

Version

1.6.3

License

MIT

Unpacked Size

11.9 kB

Total Files

13

Last publish

Collaborators

  • pi0
  • ricardogobbosouza