-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from snyk/test/adding-tests
test: adding system and functional tests
- Loading branch information
Showing
15 changed files
with
168 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Contributing | ||
|
||
## Commit messages | ||
|
||
Commit messages must follow the [Angular-style](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit-message-format) commit format (but excluding the scope). | ||
|
||
i.e: | ||
|
||
```text | ||
fix: minified scripts being removed | ||
Also includes tests | ||
``` | ||
|
||
This will allow for the automatic changelog to generate correctly. | ||
|
||
### Commit types | ||
|
||
Must be one of the following: | ||
|
||
* **feat**: A new feature | ||
* **fix**: A bug fix | ||
* **docs**: Documentation only changes | ||
* **test**: Adding missing tests | ||
* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation | ||
* **refactor**: A code change that neither fixes a bug nor adds a feature | ||
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) | ||
* **perf**: A code change that improves performance | ||
|
||
To release a major you need to add `BREAKING CHANGE: ` to the start of the body and the detail of the breaking change. | ||
|
||
## Code standards | ||
|
||
Ensure that your code adheres to the included `.jshintrc` and `.jscsrc` configs. | ||
|
||
## Sending pull requests | ||
|
||
- new command line options are generally discouraged unless there's a *really* good reason | ||
- add tests for newly added code (and try to mirror directory and file structure if possible) | ||
- spell check | ||
- PRs will not be code reviewed unless all tests are passing | ||
|
||
*Important:* when fixing a bug, please commit a **failing test** first so that Travis CI (or I can) can show the code failing. Once that commit is in place, then commit the bug fix, so that we can test *before* and *after*. | ||
|
||
Remember that you're developing for multiple platforms and versions of node, so if the tests pass on your Mac or Linux or Windows machine, it *may* not pass elsewhere. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
- `node -v`: | ||
- `npm -v`: | ||
- `snyk -v`: | ||
- Command run: | ||
|
||
### Expected behaviour | ||
|
||
|
||
### Actual behaviour | ||
|
||
|
||
### Steps to reproduce | ||
|
||
|
||
--- | ||
|
||
If applicable, please append the `--debug` flag on your command and include the output here **ensuring to remove any sensitive/personal details or tokens. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
- [ ] Ready for review | ||
- [ ] Follows CONTRIBUTING rules | ||
- [ ] Reviewed by Snyk internal team | ||
|
||
#### What does this PR do? | ||
|
||
|
||
#### Where should the reviewer start? | ||
|
||
|
||
#### How should this be manually tested? | ||
|
||
|
||
#### Any background context you want to provide? | ||
|
||
|
||
#### What are the relevant tickets? | ||
|
||
|
||
#### Screenshots | ||
|
||
|
||
#### Additional questions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
/node_modules/ | ||
__pycache__/ | ||
*.pyc | ||
test/fixtures/testproj/project/project/ | ||
test/fixtures/testproj/project/target/ | ||
test/fixtures/testproj/target/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
lazy val root = (project in file(".")). | ||
settings( | ||
inThisBuild(List( | ||
organization := "com.example", | ||
scalaVersion := "2.12.1", | ||
version := "0.1.0-SNAPSHOT" | ||
)), | ||
name := "Hello", | ||
libraryDependencies += "axis" % "axis" % "1.4" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.version=0.13.13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.8.2") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package example | ||
|
||
object Hello extends Greeting with App { | ||
println(greeting) | ||
} | ||
|
||
trait Greeting { | ||
lazy val greeting: String = "hello" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
var test = require('tap-only'); | ||
var plugin = require('../../lib'); | ||
var fs = require('fs'); | ||
|
||
test('run inspect()', function (t) { | ||
t.plan(1); | ||
return plugin.inspect( | ||
__dirname + '/../fixtures/testproj/', | ||
'build.sbt') | ||
.then(function (result) { | ||
t.equal(result.package | ||
.dependencies['com.example:hello_2.12'] | ||
.dependencies['axis:axis'] | ||
.dependencies['axis:axis-jaxrpc'] | ||
.dependencies['org.apache.axis:axis-jaxrpc'].version, | ||
'1.4', | ||
'correct version found'); | ||
}); | ||
}); |