Skip to content
This repository was archived by the owner on Sep 6, 2019. It is now read-only.

Add a test #5

Merged
merged 3 commits into from
Oct 25, 2018
Merged

Add a test #5

merged 3 commits into from
Oct 25, 2018

Conversation

TimonVS
Copy link
Contributor

@TimonVS TimonVS commented Oct 2, 2018

Copied over the example code from the JavaScript template and slightly modified it to be compatible with TypeScript.

The tests run successfully, but Standard fails with the following error:

λ ~/Projects/template-typescript/ add-test* npm run test

> [email protected] test /Users/timon/Projects/template-typescript
> jest && standard **/*.ts

 PASS  test/index.test.ts
  ✓ that we can run tests (4ms)
  My Probot app
    ✓ creates a comment when an issue is opened (5ms)

18:51:51.851Z  INFO probot: Yay, the app was loaded!
Test Suites: 1 passed, 1 total
Tests:       2 passed, 2 total
Snapshots:   0 total
Time:        1.678s, estimated 2s
Ran all test suites.
=============

WARNING: You are currently running a version of TypeScript which is not officially supported by typescript-eslint-parser.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: ~3.0.1

YOUR TYPESCRIPT VERSION: 3.1.1

Please only submit bug reports when using the officially supported version.

=============
standard: Use JavaScript Standard Style (https://standardjs.com)
  /Users/timon/Projects/template-typescript/src/index.ts:1:10: 'Application' is defined but never used.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test: `jest && standard **/*.ts`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/timon/.npm/_logs/2018-10-02T18_51_52_827Z-debug.log
λ ~/Projects/template-typescript/ add-test* 

This is just a heads up, I might solve this in a seperate PR :)

Fixes: #3

Copy link
Contributor

@hiimbex hiimbex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @TimonVS! I'm gonna go ahead and merge, but as an FYI, there is work being done in probot/create-probot-app#36 + probot/probot#674 to re-work how create-probot-app works which will make this repo obsolete.

It will post this template into tempaltes/basic-ts, so feel free to PR that branch if there's anything the test I wrote in there doesn't reflect which this one does! :)

@hiimbex hiimbex merged commit dbc17d4 into probot:master Oct 25, 2018
@TimonVS
Copy link
Contributor Author

TimonVS commented Oct 25, 2018

@hiimbex Thanks, good to know that it's being reworked! I'll check it out :)

@hiimbex
Copy link
Contributor

hiimbex commented Oct 25, 2018

The test in particular is here: https://github.com/probot/create-probot-app/pull/36/files#diff-5e27b297aa22294ff0126763d5fbce56! I used nock instead, but I think it gets at the same point!

GitHub
In support of probot/probot#674, this PR aims to accomplish the goals of how the create-probot-app script will access the use case templates. It does so by referencing them locally, and will includ...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants