Skip to content

Commit 6e03e11

Browse files
tehraninasabwebwarrior-ws
authored andcommitted
FileConventions.Test: add failing test
Add failing test for DetectUnpinnedNpmPackageInstallVersions function.
1 parent 4823d7d commit 6e03e11

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed
File renamed without changes.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
file-conventions:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Install an npm package without specifying its version
11+
run: sudo npm install --save-dev @prettier/plugin-xml

src/FileConventions.Test/FileConventions.Test.fs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ let DetectUnpinnedNpmPackageInstallVersions1() =
162162
(FileInfo(
163163
Path.Combine(
164164
dummyFilesDirectory.FullName,
165-
"DummyCIWithUnpinnedNpmPackageInstallVersion.yml"
165+
"DummyCIWithUnpinnedNpmPackageInstallVersion1.yml"
166166
)
167167
))
168168

@@ -188,6 +188,22 @@ let DetectUnpinnedNpmPackageInstallVersions2() =
188188
)
189189

190190

191+
[<Test>]
192+
let DetectUnpinnedNpmPackageInstallVersions3() =
193+
let fileInfo =
194+
(FileInfo(
195+
Path.Combine(
196+
dummyFilesDirectory.FullName,
197+
"DummyCIWithUnpinnedNpmPackageInstallVersion2.yml"
198+
)
199+
))
200+
201+
Assert.That(
202+
DetectUnpinnedNpmPackageInstallVersions fileInfo,
203+
Is.EqualTo true
204+
)
205+
206+
191207
[<Test>]
192208
let DetectAsteriskInPackageReferenceItems1() =
193209
let fileInfo =

0 commit comments

Comments
 (0)