Skip to content

Commit

Permalink
fix: cli default config folder
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Sep 1, 2020
1 parent 2287af3 commit 7ac60d1
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 6 deletions.
1 change: 1 addition & 0 deletions core/webpack-compile/src/args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const defaultCliArgs: ArgOptions = [
alias: 'c',
description: 'configuration folder',
type: 'string',
default: './.config',
},
},
{
Expand Down
39 changes: 39 additions & 0 deletions examples/stories/src/tutorial/testing/jest-snapshots.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: Testing/Jest Snapshots
route: /tutorial/testing/jest-snapshots
type: tutorial
tags:
- testing
- snapshots
- jest
- stories
order: 1
draft: true
author: atanasster
---

## Overview

The [jest-snapshots](https://github.com/ccontrols/component-controls/tree/master/plugins/jest-snapshots) package automatically creates snapshot tests for your component based on the already created documentation stories.

- Easy to use cli with "zero" configuration.
- More advanced level to customize the framework renderer.
- Advanced level for full control over which stories to use for the tests.
- Support for a variety of test rendderes starting with [react-test-renderer](https://reactjs.org/docs/test-renderer.html), [react-testing-library](https://testing-library.com/docs/react-testing-library/intro) and [enzyme](https://enzymejs.github.io/enzyme/).

## Install

```sh
yarn add @component-controls/jest-snapshots --dev
```

## CLI - `cc-jest`

The command-line interface for jest-snapshots allows for the quickest, zero-config setup. You just need to add a `test` script to your `package.json` file

```js:title=package.json
"scripts": {
...
"test": "cc-jest -c ./.config"
},
```
12 changes: 6 additions & 6 deletions plugins/jest-snapshots/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
- [Install](#install)
- [API](#api)

# In action

[Example site](https://component-controls.com/api/components-actioncontainer--overview/viewport)

# Overview

# Getting Started
- Easy to use cli with "zero" configuration.
- More advanced level to customize the framework renderer.
- Advanced level for full control over which stories to use for the tests.
- Support for a variety of test rendderes starting with [react-test-renderer](https://reactjs.org/docs/test-renderer.html), [react-testing-library](docs) and [enzyme](https://enzymejs.github.io/enzyme/).


## Install
# Install

```sh
yarn add @component-controls/jest-snapshots --dev
Expand Down

0 comments on commit 7ac60d1

Please sign in to comment.