From e77c1e999b3909d09788357755dc69f1ac535789 Mon Sep 17 00:00:00 2001 From: Sertac Olgunsoylu Date: Fri, 10 Apr 2020 14:45:19 -0700 Subject: [PATCH] Add default options to context in test fixture --- src/template/src/fixtures/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/template/src/fixtures/index.js b/src/template/src/fixtures/index.js index c405203..c00a36b 100644 --- a/src/template/src/fixtures/index.js +++ b/src/template/src/fixtures/index.js @@ -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));