Chinmoy Samanta
Chinmoy Samanta

Reputation: 1426

How to exclude some spec files in jasmine?

Is there any way to exclude some spec files with in a directory in jasmine? For example, I want to exclude all spec in the extended folder from Foo folder.

```
├── Foo
│   ├── sub
|   |    |
|   |    |--extended
│   │         ├── a-spec.js
|   |         ├── e-spec.js
│   ├── b-spec.js
│   ├── c-spec.js
│   ├── d-spec.js
└── 
```

I have tried with folowing jasmin.json.But this is not working.

    {
    "spec_dir": "Foo/",
    "spec_files": [
        "**/*[sS]pec.js",
        "!**/extended/*.js"
    ]
}

Upvotes: 3

Views: 2470

Answers (1)

Deb Samanta
Deb Samanta

Reputation: 46

You can get information regrading this issue on jasmine github issue.

Jasmine now accepts glob patterns like this:

{
  spec_files: [
    '**/*spec.js',
    '!foo/**/*.js',
    'foo/really/*.js'
  ]
}

Upvotes: 3

Related Questions