This repository was archived by the owner on Aug 17, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmultiUnnamed.js
More file actions
74 lines (58 loc) · 1.68 KB
/
Copy pathmultiUnnamed.js
File metadata and controls
74 lines (58 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// @flow
import path from 'path';
import { getComponents } from '../getComponents';
import Italics from './fileMocks/multiUnnamed/Italics';
import Bold from './fileMocks/multiUnnamed/Bold';
describe('Unnamed multi fixture file', () => {
let components;
beforeEach(async () => {
components = await getComponents({
cwd: path.join(__dirname, 'fileMocks/multiUnnamed')
});
});
describe('Bold fixtures', () => {
let fixtures;
beforeEach(() => {
fixtures = components[0].fixtures;
});
it('has "default" name', () => {
expect(fixtures[0].name).toBe('default');
});
it('has "default (1)" name', () => {
expect(fixtures[1].name).toBe('default (1)');
});
it('has multi file path', () => {
expect(fixtures[0].filePath).toBe(
require.resolve('./fileMocks/multiUnnamed/fixtures')
);
});
it('has multi file path', () => {
expect(fixtures[1].filePath).toBe(
require.resolve('./fileMocks/multiUnnamed/fixtures')
);
});
it('has fixtureIndex 0', () => {
expect(fixtures[0].fixtureIndex).toBe(0);
});
it('has fixtureIndex 1', () => {
expect(fixtures[1].fixtureIndex).toBe(1);
});
});
describe('Italics fixture', () => {
let fixtures;
beforeEach(() => {
fixtures = components[1].fixtures;
});
it('has "default" name', () => {
expect(fixtures[0].name).toBe('default');
});
it('has multi file path', () => {
expect(fixtures[0].filePath).toBe(
require.resolve('./fileMocks/multiUnnamed/fixtures')
);
});
it('has fixtureIndex 2', () => {
expect(fixtures[0].fixtureIndex).toBe(2);
});
});
});