New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@seagull/seed

Package Overview
Dependencies
Maintainers
7
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@seagull/seed

Seed implementation for the seagull framework

latest
Source
npmnpm
Version
20.0.5
Version published
Maintainers
7
Created
Source

seed (fixtures)

Library implementing seed data generation for test cases.

Seed data generation

Use global switch to enable seed data generation:

import { config } from '@seagull/seed'

config.seed = true
...
// do your thing
...
config.seed = false

The seed data can be fetched in any mode except pure, as tests within the code pipeline should not call external ressources.

Configuration hooks

In case you want to modify the seed creation for a specific case, you can create a specific SeedLocalConfig by creating a TypeScript-file within the seed folder structure:

import { LocalConfig } from '@seagull/seed'

export default <LocalConfig<SomeResponse>>{
  hook: (fixture: SomeResponse) => {
    // do something, e.g. slice some arrays within the fixture
    return fixture
  },
  expiresInDays: 14, // fixture will be re-fetched after 14 days
}

A configuration file is applied for all subsequent fixtures.

Keywords

web

FAQs

Package last updated on 04 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts