# Snapshot report for `src/lib/core/md-seed-runner.test.js`

The actual snapshot is saved in `md-seed-runner.test.js.snap`.

Generated by [AVA](https://ava.li).

## Should _connectToMongodb

> Snapshot 1

    [
      {
        type: 'MONGOOSE_CONNECT_START',
      },
      {
        type: 'MONGOOSE_CONNECT_SUCCESS',
      },
    ]

## Should _connectToMongodb and fail

> connect to mongodb error

    MdSeedRunnerError {
      payload: {
        error: Error {
          message: 'some-error',
        },
      },
      type: 'MONGOOSE_CONNECT_ERROR',
      message: 'some-error',
    }

> observable results

    [
      {
        type: 'MONGOOSE_CONNECT_START',
      },
    ]

## Should _dropDatabase

> Snapshot 1

    [
      {
        type: 'MONGOOSE_DROP_START',
      },
      {
        type: 'MONGOOSE_DROP_SUCCESS',
      },
    ]

## Should _dropDatabase and fail

> dropdb error

    MdSeedRunnerError {
      payload: {
        error: Error {
          message: 'some-error',
        },
      },
      type: 'MONGOOSE_DROP_ERROR',
      message: 'some-error',
    }

> observable results

    [
      {
        type: 'MONGOOSE_DROP_START',
      },
    ]

## Should _run

> Snapshot 1

    [
      {
        payload: {
          dropDatabase: false,
          selectedSeeders: [
            'Users',
            'Posts',
          ],
        },
        type: 'START',
      },
      {
        payload: {
          dropDatabase: false,
          selectedSeeders: [
            'Users',
            'Posts',
          ],
        },
        type: 'SUCCESS',
      },
    ]

## Should _run and drop database

> Snapshot 1

    [
      {
        payload: {
          dropDatabase: true,
          selectedSeeders: [
            'Users',
            'Posts',
          ],
        },
        type: 'START',
      },
      {
        payload: {
          dropDatabase: true,
          selectedSeeders: [
            'Users',
            'Posts',
          ],
        },
        type: 'SUCCESS',
      },
    ]

## Should _run and fail

> Snapshot 1

    {
      payload: {
        error: Error {
          message: 'Error',
        },
      },
      type: 'ERROR',
    }

## Should _run and fail with type and payload

> Snapshot 1

    {
      payload: {
        error: Error {
          message: 'some error message',
        },
        some: 'data',
      },
      type: 'some-type',
    }

## Should _runSeeder

> observable results

    [
      {
        payload: {
          name: 'User',
        },
        type: 'SEEDER_START',
      },
      {
        payload: {
          name: 'User',
          results: 'some-results',
        },
        type: 'SEEDER_SUCCESS',
      },
    ]

## Should _runSeeder and fail

> _runSeeder error

    MdSeedRunnerError {
      payload: {
        error: Error {
          message: 'some-error',
        },
        name: 'User',
      },
      type: 'SEEDER_ERROR',
      message: 'some-error',
    }

> observable results

    [
      {
        payload: {
          name: 'User',
        },
        type: 'SEEDER_START',
      },
    ]

## Should _runSeeders

> _runSeeder args

    [
      [
        {
          Seeder: 'Users',
          name: '0',
        },
      ],
      [
        {
          Seeder: 'Posts',
          name: '1',
        },
      ],
    ]

> observable results

    [
      {
        payload: {
          seeders: [
            '0',
            '1',
          ],
        },
        type: 'ALL_SEEDERS_START',
      },
      {
        payload: {
          seeders: [
            '0',
            '1',
          ],
        },
        type: 'ALL_SEEDERS_FINISH',
      },
    ]
