{"action":"created","issue":{"url":"https://api.github.com/repos/wallabyjs/public/issues/623","repository_url":"https://api.github.com/repos/wallabyjs/public","labels_url":"https://api.github.com/repos/wallabyjs/public/issues/623/labels{/name}","comments_url":"https://api.github.com/repos/wallabyjs/public/issues/623/comments","events_url":"https://api.github.com/repos/wallabyjs/public/issues/623/events","html_url":"https://github.com/wallabyjs/public/issues/623","id":157811212,"number":623,"title":"[Jest] - Tests fail in atom wallaby, but not through the CLI or with TravisCI","user":{"login":"dsifford","id":5240018,"avatar_url":"https://avatars.githubusercontent.com/u/5240018?v=3","gravatar_id":"","url":"https://api.github.com/users/dsifford","html_url":"https://github.com/dsifford","followers_url":"https://api.github.com/users/dsifford/followers","following_url":"https://api.github.com/users/dsifford/following{/other_user}","gists_url":"https://api.github.com/users/dsifford/gists{/gist_id}","starred_url":"https://api.github.com/users/dsifford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsifford/subscriptions","organizations_url":"https://api.github.com/users/dsifford/orgs","repos_url":"https://api.github.com/users/dsifford/repos","events_url":"https://api.github.com/users/dsifford/events{/privacy}","received_events_url":"https://api.github.com/users/dsifford/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-06-01T02:35:30Z","updated_at":"2016-06-01T03:06:07Z","closed_at":null,"body":"### Issue description or question\r\n\r\nStarting within the last few hours, a bunch of tests are being reported as failing, when they aren't actually failing.\r\n\r\nHere's a small test that is failing for example:\r\n\r\n```ts\r\n// Pagination.ts\r\nexport default function paginate(rows: Array<any>, visibleRows: number, currentPage: number) {\r\n    return rows.filter((uid, i: number) =>\r\n        (visibleRows * currentPage) <= i && i < (visibleRows * currentPage + visibleRows)\r\n    );\r\n}\r\n```\r\n\r\n```\r\n// Pagination-test.ts\r\njest.unmock('../Pagination.ts');\r\n\r\nimport paginate from '../Pagination';\r\n\r\nconst rows = Array.from(Array(100).keys());\r\n\r\ndescribe('Paginate Function', () => {\r\n    it('should paginate correctly', () => {\r\n        expect(paginate(rows, 10, 5)).toEqual([50, 51, 52, 53, 54, 55, 56, 57, 58, 59]);\r\n        expect(paginate(rows, 3, 2)).toEqual([6, 7, 8]);\r\n        expect(paginate(rows, 1, 39)).toEqual([39]);\r\n        expect(paginate(rows, 100, 4)).toEqual([]);\r\n        expect(paginate(rows, 0, 10)).toEqual([]);\r\n    });\r\n});\r\n```\r\n\r\nMessage (for every expect line): `Expected undefined to equal` [my assertion]\r\n\r\n### Wallaby.js configuration file\r\n\r\n```javascript\r\nmodule.exports = function (wallaby) {\r\n    return {\r\n        files: [\r\n            'wp-content/**/*.tsx',\r\n            'wp-content/**/*.ts',\r\n            'typings/**/*.d.ts',\r\n            '!wp-content/**/__tests__/*',\r\n        ],\r\n        tests: [\r\n            'wp-content/**/__tests__/*-test.tsx',\r\n            'wp-content/**/__tests__/*-test.ts',\r\n        ],\r\n        env: {\r\n            type: 'node',\r\n            runner: 'node',\r\n        },\r\n        testFramework: 'jest',\r\n        bootstrap: function (wallaby) {\r\n            wallaby.testFramework.configure({\r\n                'scriptPreprocessor': 'jestPreprocessor.js',\r\n                'testFileExtensions': [\r\n                  'ts',\r\n                  'tsx',\r\n                  'js',\r\n                ],\r\n                'moduleFileExtensions': [\r\n                  'js',\r\n                  'ts',\r\n                  'tsx',\r\n                  'json',\r\n                ],\r\n                'unmockedModulePathPatterns': [\r\n                  'react',\r\n                  'react-dom',\r\n                  'react-addons-test-utils',\r\n                  'enzyme',\r\n                  'sinon',\r\n                ],\r\n            });\r\n        }\r\n    };\r\n};\r\n\r\n```\r\n\r\n### Code editor or IDE name and version\r\n\r\nAtom latest\r\n\r\n### OS name and version\r\n\r\nArch Linux\r\n"},"comment":{"url":"https://api.github.com/repos/wallabyjs/public/issues/comments/222880821","html_url":"https://github.com/wallabyjs/public/issues/623#issuecomment-222880821","issue_url":"https://api.github.com/repos/wallabyjs/public/issues/623","id":222880821,"user":{"login":"ArtemGovorov","id":979966,"avatar_url":"https://avatars.githubusercontent.com/u/979966?v=3","gravatar_id":"","url":"https://api.github.com/users/ArtemGovorov","html_url":"https://github.com/ArtemGovorov","followers_url":"https://api.github.com/users/ArtemGovorov/followers","following_url":"https://api.github.com/users/ArtemGovorov/following{/other_user}","gists_url":"https://api.github.com/users/ArtemGovorov/gists{/gist_id}","starred_url":"https://api.github.com/users/ArtemGovorov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArtemGovorov/subscriptions","organizations_url":"https://api.github.com/users/ArtemGovorov/orgs","repos_url":"https://api.github.com/users/ArtemGovorov/repos","events_url":"https://api.github.com/users/ArtemGovorov/events{/privacy}","received_events_url":"https://api.github.com/users/ArtemGovorov/received_events","type":"User","site_admin":false},"created_at":"2016-06-01T03:06:07Z","updated_at":"2016-06-01T03:06:07Z","body":"Ok, thanks for checking.\r\nCould you please share your `tsconfig.json` file and `jestPreprocessor.js` file?"}}
{"actor":{"display_login":"ArtemGovorov"}}