Skip to content

Commit e142b6c

Browse files
author
Michał Miszczyszyn
authored
New version (#22)
* Fix rollup * Update deps and tests * Update cypress * Fix tests * Update nodejs.yml * Revert target esnext * Fix prettier * Danger * Add danger * Specific version * Coveralls * Use codecov * Last touch * trigger build * update lock
1 parent 7904300 commit e142b6c

File tree

11 files changed

+8345
-9983
lines changed

11 files changed

+8345
-9983
lines changed

.prettierrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"parser": "typescript",
32
"semi": true,
43
"singleQuote": true,
54
"trailingComma": "es5",

.travis.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# react-with-observable
2-
[![Build Status](https://travis-ci.org/mmiszy/react-with-observable.svg?branch=master)](https://travis-ci.org/mmiszy/react-with-observable)
3-
[![Coverage Status](https://coveralls.io/repos/github/mmiszy/react-with-observable/badge.svg?branch=master)](https://coveralls.io/github/mmiszy/react-with-observable?branch=master)
2+
[![buddy pipeline](https://app.buddy.works/mmiszy/react-with-observable/pipelines/pipeline/209733/badge.svg?token=dfc09b1458ffdb6655820015738f0e3bc1a515874804b85799fe6af214f3473c "buddy pipeline")](https://app.buddy.works/mmiszy/react-with-observable/pipelines/pipeline/209733)
3+
[![codecov](https://codecov.io/gh/mmiszy/react-with-observable/branch/master/graph/badge.svg)](https://codecov.io/gh/mmiszy/react-with-observable)
44
[![cypress dashboard](https://img.shields.io/badge/cypress-dashboard-brightgreen.svg)](https://dashboard.cypress.io/#/projects/dmnv1v/runs)
55
[![npm](https://img.shields.io/npm/v/react-with-observable.svg)](https://www.npmjs.com/package/react-with-observable)
66
[![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/react-with-observable.svg)](https://www.npmjs.com/package/react-with-observable)
77

88

9+
910
`react-with-observable`: use Observables declaratively in ⚛️ React!
1011

1112
* ✅ Supports any Observable implementation compatible with ECMAScript Observable (e.g. **RxJS**)!

cypress/tsconfig.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"include": [
4+
"../node_modules/cypress",
5+
"../node_modules/cypress/types/chai",
6+
"*/*.ts"
7+
]
8+
}

dangerfile.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,20 @@ const modifiedSpecFiles = danger.git.modified_files.filter(function(filePath) {
1616
return filePath.match(/\.spec\.(js|jsx|ts|tsx)$/gi);
1717
});
1818

19-
const testFilesIncludeExclusion = modifiedSpecFiles.reduce(function(acc, value) {
20-
var content = fs.readFileSync(value).toString();
21-
var invalid = content.includes('it.only') || content.includes('describe.only');
22-
if (invalid) {
23-
acc.push(path.basename(value));
24-
}
25-
return acc;
26-
}, []);
19+
const testFilesIncludeExclusion = modifiedSpecFiles.reduce(
20+
function(acc, value) {
21+
var content = fs.readFileSync(value).toString();
22+
var invalid = content.includes('it.only') || content.includes('describe.only');
23+
if (invalid) {
24+
acc.push(path.basename(value));
25+
}
26+
return acc;
27+
},
28+
[] as string[]
29+
);
2730

2831
if (testFilesIncludeExclusion.length > 0) {
29-
fail('An `only` was left in tests (' + testFilesIncludeExclusion + ')');
32+
fail('An `only` was left in tests (' + testFilesIncludeExclusion.join(', ') + ')');
3033
}
3134

3235
if (hasAppChanges && !hasTestChanges) {

jest.config.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
module.exports = {
2+
preset: 'ts-jest',
3+
testEnvironment: 'node',
4+
25
roots: ['<rootDir>/src'],
3-
transform: {
4-
'^.+\\.tsx?$': 'ts-jest',
5-
},
6-
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
7-
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
8-
setupTestFrameworkScriptFile: '<rootDir>/test.config.ts',
6+
setupFilesAfterEnv: ['<rootDir>/test.config.ts'],
97
collectCoverageFrom: ['src/**/*.{ts,tsx}', '!**/node_modules/**'],
108
restoreMocks: true,
9+
testEnvironment: 'jsdom',
1110
};

0 commit comments

Comments
 (0)