File: schema-validation.test.js

package info (click to toggle)
node-extract-text-webpack-plugin 3.0.2-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,196 kB
  • sloc: javascript: 1,072; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 614 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* eslint-disable no-unused-expressions */
import ExtractTextPlugin from '../src';


describe('json schema validation', () => {
  it('does not throw if a filename is specified', () => {
    expect(() => {
      ExtractTextPlugin.extract('file.css');
    }).doesNotThrow;
  });

  it('does not throw if a correct config object is passed in', () => {
    expect(() => {
      ExtractTextPlugin.extract({ use: 'css-loader' });
    }).doesNotThrow;
  });

  it('throws if an incorrect config is passed in', () => {
    expect(() => {
      ExtractTextPlugin.extract({ style: 'file.css' });
    }).toThrow();
  });
});