{"action":"created","comment":{"url":"https://api.github.com/repos/socraticorg/mathsteps/pulls/comments/109494776","pull_request_review_id":30581396,"id":109494776,"diff_hunk":"@@ -0,0 +1,33 @@\n+const assert = require('assert');\n+const factor = require('../../lib/factor');\n+const print = require('../../lib/util/print');\n+\n+const NO_STEPS = 'no-steps';\n+\n+function testFactor(expressionString, outputStr, debug=false) {\n+  const steps = factor(expressionString, debug);\n+  let lastStep;\n+  if (steps.length === 0) {\n+    lastStep = NO_STEPS;\n+  }\n+  else {\n+    lastStep = print(steps[steps.length -1].newNode);\n+  }\n+  it(expressionString + ' -> ' + outputStr, (done) => {\n+    assert.equal(lastStep, outputStr);\n+    done();\n+  });\n+}\n+\n+describe('factor expressions', function () {\n+  const tests = [\n+    ['x^2', NO_STEPS],","path":"test/factor/factor.test.js","position":24,"original_position":24,"commit_id":"b5b63932fea3a1f57fbc4f4b9de5199899197cc5","original_commit_id":"b5b63932fea3a1f57fbc4f4b9de5199899197cc5","user":{"login":"evykassirer","id":5634097,"avatar_url":"https://avatars2.githubusercontent.com/u/5634097?v=3","gravatar_id":"","url":"https://api.github.com/users/evykassirer","html_url":"https://github.com/evykassirer","followers_url":"https://api.github.com/users/evykassirer/followers","following_url":"https://api.github.com/users/evykassirer/following{/other_user}","gists_url":"https://api.github.com/users/evykassirer/gists{/gist_id}","starred_url":"https://api.github.com/users/evykassirer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evykassirer/subscriptions","organizations_url":"https://api.github.com/users/evykassirer/orgs","repos_url":"https://api.github.com/users/evykassirer/repos","events_url":"https://api.github.com/users/evykassirer/events{/privacy}","received_events_url":"https://api.github.com/users/evykassirer/received_events","type":"User","site_admin":false},"body":"can you add some that aren't quadratics at all, too?","created_at":"2017-04-03T18:45:21Z","updated_at":"2017-04-03T18:55:41Z","html_url":"https://github.com/socraticorg/mathsteps/pull/148#discussion_r109494776","pull_request_url":"https://api.github.com/repos/socraticorg/mathsteps/pulls/148","_links":{"self":{"href":"https://api.github.com/repos/socraticorg/mathsteps/pulls/comments/109494776"},"html":{"href":"https://github.com/socraticorg/mathsteps/pull/148#discussion_r109494776"},"pull_request":{"href":"https://api.github.com/repos/socraticorg/mathsteps/pulls/148"}}},"pull_request":{"url":"https://api.github.com/repos/socraticorg/mathsteps/pulls/148","id":112820483,"html_url":"https://github.com/socraticorg/mathsteps/pull/148","diff_url":"https://github.com/socraticorg/mathsteps/pull/148.diff","patch_url":"https://github.com/socraticorg/mathsteps/pull/148.patch","issue_url":"https://api.github.com/repos/socraticorg/mathsteps/issues/148","number":148,"state":"open","locked":false,"title":"Exposing the factoring module and adding more coverage","user":{"login":"aelnaiem","id":786569,"avatar_url":"https://avatars1.githubusercontent.com/u/786569?v=3","gravatar_id":"","url":"https://api.github.com/users/aelnaiem","html_url":"https://github.com/aelnaiem","followers_url":"https://api.github.com/users/aelnaiem/followers","following_url":"https://api.github.com/users/aelnaiem/following{/other_user}","gists_url":"https://api.github.com/users/aelnaiem/gists{/gist_id}","starred_url":"https://api.github.com/users/aelnaiem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aelnaiem/subscriptions","organizations_url":"https://api.github.com/users/aelnaiem/orgs","repos_url":"https://api.github.com/users/aelnaiem/repos","events_url":"https://api.github.com/users/aelnaiem/events{/privacy}","received_events_url":"https://api.github.com/users/aelnaiem/received_events","type":"User","site_admin":false},"body":"This covers two things. Increasing coverage by handling factoring cases when a != 1, and exposing the ability to get steps for factoring through `mathsteps.factor()`","created_at":"2017-03-27T19:30:23Z","updated_at":"2017-04-03T18:55:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4e16d63a9da452a4a889a297504416d5001a944e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/socraticorg/mathsteps/pulls/148/commits","review_comments_url":"https://api.github.com/repos/socraticorg/mathsteps/pulls/148/comments","review_comment_url":"https://api.github.com/repos/socraticorg/mathsteps/pulls/comments{/number}","comments_url":"https://api.github.com/repos/socraticorg/mathsteps/issues/148/comments","statuses_url":"https://api.github.com/repos/socraticorg/mathsteps/statuses/b5b63932fea3a1f57fbc4f4b9de5199899197cc5","head":{"label":"socraticorg:ae_expose_factor","ref":"ae_expose_factor","sha":"b5b63932fea3a1f57fbc4f4b9de5199899197cc5","user":{"login":"socraticorg","id":4368132,"avatar_url":"https://avatars0.githubusercontent.com/u/4368132?v=3","gravatar_id":"","url":"https://api.github.com/users/socraticorg","html_url":"https://github.com/socraticorg","followers_url":"https://api.github.com/users/socraticorg/followers","following_url":"https://api.github.com/users/socraticorg/following{/other_user}","gists_url":"https://api.github.com/users/socraticorg/gists{/gist_id}","starred_url":"https://api.github.com/users/socraticorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socraticorg/subscriptions","organizations_url":"https://api.github.com/users/socraticorg/orgs","repos_url":"https://api.github.com/users/socraticorg/repos","events_url":"https://api.github.com/users/socraticorg/events{/privacy}","received_events_url":"https://api.github.com/users/socraticorg/received_events","type":"Organization","site_admin":false},"repo":{"id":74380149,"name":"mathsteps","full_name":"socraticorg/mathsteps","owner":{"login":"socraticorg","id":4368132,"avatar_url":"https://avatars0.githubusercontent.com/u/4368132?v=3","gravatar_id":"","url":"https://api.github.com/users/socraticorg","html_url":"https://github.com/socraticorg","followers_url":"https://api.github.com/users/socraticorg/followers","following_url":"https://api.github.com/users/socraticorg/following{/other_user}","gists_url":"https://api.github.com/users/socraticorg/gists{/gist_id}","starred_url":"https://api.github.com/users/socraticorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socraticorg/subscriptions","organizations_url":"https://api.github.com/users/socraticorg/orgs","repos_url":"https://api.github.com/users/socraticorg/repos","events_url":"https://api.github.com/users/socraticorg/events{/privacy}","received_events_url":"https://api.github.com/users/socraticorg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/socraticorg/mathsteps","description":"Step by step math solutions for everyone","fork":false,"url":"https://api.github.com/repos/socraticorg/mathsteps","forks_url":"https://api.github.com/repos/socraticorg/mathsteps/forks","keys_url":"https://api.github.com/repos/socraticorg/mathsteps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/socraticorg/mathsteps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/socraticorg/mathsteps/teams","hooks_url":"https://api.github.com/repos/socraticorg/mathsteps/hooks","issue_events_url":"https://api.github.com/repos/socraticorg/mathsteps/issues/events{/number}","events_url":"https://api.github.com/repos/socraticorg/mathsteps/events","assignees_url":"https://api.github.com/repos/socraticorg/mathsteps/assignees{/user}","branches_url":"https://api.github.com/repos/socraticorg/mathsteps/branches{/branch}","tags_url":"https://api.github.com/repos/socraticorg/mathsteps/tags","blobs_url":"https://api.github.com/repos/socraticorg/mathsteps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/socraticorg/mathsteps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/socraticorg/mathsteps/git/refs{/sha}","trees_url":"https://api.github.com/repos/socraticorg/mathsteps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/socraticorg/mathsteps/statuses/{sha}","languages_url":"https://api.github.com/repos/socraticorg/mathsteps/languages","stargazers_url":"https://api.github.com/repos/socraticorg/mathsteps/stargazers","contributors_url":"https://api.github.com/repos/socraticorg/mathsteps/contributors","subscribers_url":"https://api.github.com/repos/socraticorg/mathsteps/subscribers","subscription_url":"https://api.github.com/repos/socraticorg/mathsteps/subscription","commits_url":"https://api.github.com/repos/socraticorg/mathsteps/commits{/sha}","git_commits_url":"https://api.github.com/repos/socraticorg/mathsteps/git/commits{/sha}","comments_url":"https://api.github.com/repos/socraticorg/mathsteps/comments{/number}","issue_comment_url":"https://api.github.com/repos/socraticorg/mathsteps/issues/comments{/number}","contents_url":"https://api.github.com/repos/socraticorg/mathsteps/contents/{+path}","compare_url":"https://api.github.com/repos/socraticorg/mathsteps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/socraticorg/mathsteps/merges","archive_url":"https://api.github.com/repos/socraticorg/mathsteps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/socraticorg/mathsteps/downloads","issues_url":"https://api.github.com/repos/socraticorg/mathsteps/issues{/number}","pulls_url":"https://api.github.com/repos/socraticorg/mathsteps/pulls{/number}","milestones_url":"https://api.github.com/repos/socraticorg/mathsteps/milestones{/number}","notifications_url":"https://api.github.com/repos/socraticorg/mathsteps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/socraticorg/mathsteps/labels{/name}","releases_url":"https://api.github.com/repos/socraticorg/mathsteps/releases{/id}","deployments_url":"https://api.github.com/repos/socraticorg/mathsteps/deployments","created_at":"2016-11-21T15:58:00Z","updated_at":"2017-04-03T16:20:15Z","pushed_at":"2017-04-03T16:58:41Z","git_url":"git://github.com/socraticorg/mathsteps.git","ssh_url":"git@github.com:socraticorg/mathsteps.git","clone_url":"https://github.com/socraticorg/mathsteps.git","svn_url":"https://github.com/socraticorg/mathsteps","homepage":"https://socratic.org","size":661,"stargazers_count":1277,"watchers_count":1277,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":111,"mirror_url":null,"open_issues_count":41,"forks":111,"open_issues":41,"watchers":1277,"default_branch":"master"}},"base":{"label":"socraticorg:master","ref":"master","sha":"1bfe30eee83ab972275e40bf854e5c31a83fbd9e","user":{"login":"socraticorg","id":4368132,"avatar_url":"https://avatars0.githubusercontent.com/u/4368132?v=3","gravatar_id":"","url":"https://api.github.com/users/socraticorg","html_url":"https://github.com/socraticorg","followers_url":"https://api.github.com/users/socraticorg/followers","following_url":"https://api.github.com/users/socraticorg/following{/other_user}","gists_url":"https://api.github.com/users/socraticorg/gists{/gist_id}","starred_url":"https://api.github.com/users/socraticorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socraticorg/subscriptions","organizations_url":"https://api.github.com/users/socraticorg/orgs","repos_url":"https://api.github.com/users/socraticorg/repos","events_url":"https://api.github.com/users/socraticorg/events{/privacy}","received_events_url":"https://api.github.com/users/socraticorg/received_events","type":"Organization","site_admin":false},"repo":{"id":74380149,"name":"mathsteps","full_name":"socraticorg/mathsteps","owner":{"login":"socraticorg","id":4368132,"avatar_url":"https://avatars0.githubusercontent.com/u/4368132?v=3","gravatar_id":"","url":"https://api.github.com/users/socraticorg","html_url":"https://github.com/socraticorg","followers_url":"https://api.github.com/users/socraticorg/followers","following_url":"https://api.github.com/users/socraticorg/following{/other_user}","gists_url":"https://api.github.com/users/socraticorg/gists{/gist_id}","starred_url":"https://api.github.com/users/socraticorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socraticorg/subscriptions","organizations_url":"https://api.github.com/users/socraticorg/orgs","repos_url":"https://api.github.com/users/socraticorg/repos","events_url":"https://api.github.com/users/socraticorg/events{/privacy}","received_events_url":"https://api.github.com/users/socraticorg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/socraticorg/mathsteps","description":"Step by step math solutions for everyone","fork":false,"url":"https://api.github.com/repos/socraticorg/mathsteps","forks_url":"https://api.github.com/repos/socraticorg/mathsteps/forks","keys_url":"https://api.github.com/repos/socraticorg/mathsteps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/socraticorg/mathsteps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/socraticorg/mathsteps/teams","hooks_url":"https://api.github.com/repos/socraticorg/mathsteps/hooks","issue_events_url":"https://api.github.com/repos/socraticorg/mathsteps/issues/events{/number}","events_url":"https://api.github.com/repos/socraticorg/mathsteps/events","assignees_url":"https://api.github.com/repos/socraticorg/mathsteps/assignees{/user}","branches_url":"https://api.github.com/repos/socraticorg/mathsteps/branches{/branch}","tags_url":"https://api.github.com/repos/socraticorg/mathsteps/tags","blobs_url":"https://api.github.com/repos/socraticorg/mathsteps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/socraticorg/mathsteps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/socraticorg/mathsteps/git/refs{/sha}","trees_url":"https://api.github.com/repos/socraticorg/mathsteps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/socraticorg/mathsteps/statuses/{sha}","languages_url":"https://api.github.com/repos/socraticorg/mathsteps/languages","stargazers_url":"https://api.github.com/repos/socraticorg/mathsteps/stargazers","contributors_url":"https://api.github.com/repos/socraticorg/mathsteps/contributors","subscribers_url":"https://api.github.com/repos/socraticorg/mathsteps/subscribers","subscription_url":"https://api.github.com/repos/socraticorg/mathsteps/subscription","commits_url":"https://api.github.com/repos/socraticorg/mathsteps/commits{/sha}","git_commits_url":"https://api.github.com/repos/socraticorg/mathsteps/git/commits{/sha}","comments_url":"https://api.github.com/repos/socraticorg/mathsteps/comments{/number}","issue_comment_url":"https://api.github.com/repos/socraticorg/mathsteps/issues/comments{/number}","contents_url":"https://api.github.com/repos/socraticorg/mathsteps/contents/{+path}","compare_url":"https://api.github.com/repos/socraticorg/mathsteps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/socraticorg/mathsteps/merges","archive_url":"https://api.github.com/repos/socraticorg/mathsteps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/socraticorg/mathsteps/downloads","issues_url":"https://api.github.com/repos/socraticorg/mathsteps/issues{/number}","pulls_url":"https://api.github.com/repos/socraticorg/mathsteps/pulls{/number}","milestones_url":"https://api.github.com/repos/socraticorg/mathsteps/milestones{/number}","notifications_url":"https://api.github.com/repos/socraticorg/mathsteps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/socraticorg/mathsteps/labels{/name}","releases_url":"https://api.github.com/repos/socraticorg/mathsteps/releases{/id}","deployments_url":"https://api.github.com/repos/socraticorg/mathsteps/deployments","created_at":"2016-11-21T15:58:00Z","updated_at":"2017-04-03T16:20:15Z","pushed_at":"2017-04-03T16:58:41Z","git_url":"git://github.com/socraticorg/mathsteps.git","ssh_url":"git@github.com:socraticorg/mathsteps.git","clone_url":"https://github.com/socraticorg/mathsteps.git","svn_url":"https://github.com/socraticorg/mathsteps","homepage":"https://socratic.org","size":661,"stargazers_count":1277,"watchers_count":1277,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":111,"mirror_url":null,"open_issues_count":41,"forks":111,"open_issues":41,"watchers":1277,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/socraticorg/mathsteps/pulls/148"},"html":{"href":"https://github.com/socraticorg/mathsteps/pull/148"},"issue":{"href":"https://api.github.com/repos/socraticorg/mathsteps/issues/148"},"comments":{"href":"https://api.github.com/repos/socraticorg/mathsteps/issues/148/comments"},"review_comments":{"href":"https://api.github.com/repos/socraticorg/mathsteps/pulls/148/comments"},"review_comment":{"href":"https://api.github.com/repos/socraticorg/mathsteps/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/socraticorg/mathsteps/pulls/148/commits"},"statuses":{"href":"https://api.github.com/repos/socraticorg/mathsteps/statuses/b5b63932fea3a1f57fbc4f4b9de5199899197cc5"}}}}
{"actor":{"display_login":"evykassirer"}}