Skip to content

Commit

Permalink
Add default options to context in test fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
dirtybit committed Apr 10, 2020
1 parent fb4d290 commit e77c1e9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/template/src/fixtures/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ import project from "./project.json";
import screensData from "./screens.json";
import componentsData from "./components.json";
import versionData from "./version.json";
import { zeplin } from "../../package.json";

const defaultOptions = zeplin.options.reduce((options, option) => {
options[option.id] = option.default;
return options;
}, {});

export const context = new Context({ project, options: {} });
export const context = new Context({ project, options: defaultOptions });
export const version = new Version(versionData);
export const screens = screensData.map(data => new Screen(data));
export const components = componentsData.map(data => new Component(data));

0 comments on commit e77c1e9

Please sign in to comment.