Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
fail logs
yarn run v1.17.3
$ node ./config/test.js --full
tmpdir for backend output: /var/folders/qd/1fl34l356hgg1b0tg8hpcnxr0000gn/T/sourcecred-test-29351l6q4FBhlvd9j
Starting tasks
GO ensure-flow-typing
GO check-stopships
GO check-pretty
GO lint
GO flow
GO unit
GO check-gnu-coreutils
GO backend
PASS check-stopships
PASS ensure-flow-typing
PASS check-gnu-coreutils
PASS flow
PASS backend
GO sharness-full
GO fetchGithubRepoTest
GO fetchGithubOrgTest
PASS fetchGithubOrgTest
PASS fetchGithubRepoTest
PASS check-pretty
PASS unit
FAIL sharness-full
Exit code: 2
Contents of stdout:
*** prove ***
dummy.t ......................................................
expecting success: true
ok 1 - should trivially pass
# passed all 1 test(s)
1..1
ok
test_build_static_site.t .....................................
expecting success:
run --help >msg 2>err &&
test_must_be_empty err &&
test_path_is_file msg &&
grep -qF "usage: build_static_site.sh" msg
ok 1 - should print a help message
expecting success:
test_must_fail run 2>err &&
grep -qF -- "target directory not specified" err
ok 2 - should fail with no target
expecting success:
test_must_fail run --target 2>err &&
grep -qF -- "missing value for --target" err
ok 3 - should fail with missing target value
expecting success:
mkdir one two &&
test_must_fail run --target one --target two 2>err &&
grep -qF -- "--target specified multiple times" err
ok 4 - should fail with multiple targets
expecting success:
printf "important\nstuff" >important_data &&
test_must_fail run --target important_data 2>err &&
grep -qF -- "target is not a directory" err &&
printf "important\nstuff" | test_cmp - important_data
ok 5 - should fail with a file as target
expecting success:
printf "important\nstuff" >important_data &&
test_must_fail run --target important_data/something 2>err &&
grep -q -- "cannot create directory.*Not a directory" err &&
printf "important\nstuff" | test_cmp - important_data
ok 6 - should fail with a target under a file
expecting success:
mkdir important_dir &&
printf "redacted\n" >important_dir/.wallet.dat &&
test_must_fail run --target important_dir 2>err &&
grep -qF -- "target directory is nonempty: important_dir" err &&
printf "redacted\n" | test_cmp - important_dir/.wallet.dat
ok 7 - should fail with a nonempty directory as target
expecting success:
test_must_fail run --target putative_output --project 2>err &&
grep -qF -- "missing value for --project" err &&
printf "redacted\n" | test_cmp - important_dir/.wallet.dat
ok 8 - should fail with missing project value
expecting success:
test_must_fail run --target putative_output --cname 2>err &&
grep -qF -- "missing value for --cname" err &&
printf "redacted\n" | test_cmp - important_dir/.wallet.dat
ok 9 - should fail with missing cname value
expecting success:
test_must_fail run --target putative_output --cname "" 2>err &&
grep -qF -- "empty value for --cname" err &&
printf "redacted\n" | test_cmp - important_dir/.wallet.dat
ok 10 - should fail with empty cname
expecting success:
test_must_fail run --target putative_output \
--cname a.com --cname b.com 2>err &&
grep -qF -- "--cname specified multiple times" err &&
printf "redacted\n" | test_cmp - important_dir/.wallet.dat
ok 11 - should fail with multiple cname values
expecting success:
if [ -n "${unsafe_arg}" ]; then
printf >&2 "fatal: potentially unsafe argument: %s\n" "${arg}" &&
false
fi &&
run --target build_output/output_TWO_PROJECTS --no-backend --cname sourcecred.example.com --project sourcecred-test/example-git --project sourcecred-test/example-github >out 2>err &&
test_must_fail grep -vF \
-e "Removing contents of build directory: " \
-e "info: loading project" \
-e "DeprecationWarning: Tapable.plugin is deprecated." \
err &&
test_path_is_dir "${output_dir}" &&
test_path_is_dir "${api_dir}" &&
test_set_prereq "${prereq_name}"
not ok 12 - TWO_PROJECTS: should build the site with two projects and a CNAME
#
# if [ -n "${unsafe_arg}" ]; then
# printf >&2 "fatal: potentially unsafe argument: %s
# " "${arg}" &&
# false
# fi &&
# run --target build_output/output_TWO_PROJECTS --no-backend --cname sourcecred.example.com --project sourcecred-test/example-git --project sourcecred-test/example-github >out 2>err &&
# test_must_fail grep -vF \
# -e "Removing contents of build directory: " \
# -e "info: loading project" \
# -e "DeprecationWarning: Tapable.plugin is deprecated." \
# err &&
# test_path_is_dir "${output_dir}" &&
# test_path_is_dir "${api_dir}" &&
# test_set_prereq "${prereq_name}"
#
skipping test: TWO_PROJECTS: should have no cache
test_must_fail test_path_is_dir "${api_dir}/cache"
ok 13 # skip TWO_PROJECTS: should have no cache (missing TWO_PROJECTS)
skipping test: TWO_PROJECTS: should have a bundle
js_bundle_path= &&
js_bundle_path_glob="${output_dir}"/static/js/main.*.js &&
for main_js in ${js_bundle_path_glob}; do
if ! [ -e "${main_js}" ]; then
printf >&2 "fatal: no main bundle found\n" &&
return 1
elif [ -n "${js_bundle_path}" ]; then
printf >&2 "fatal: multiple main bundles found:\n" &&
printf >&2 " %s\n" ${js_bundle_path_glob} &&
return 1
else
js_bundle_path="${main_js}"
fi
done
ok 14 # skip TWO_PROJECTS: should have a bundle (missing TWO_PROJECTS)
skipping test: TWO_PROJECTS: should have a favicon
test_path_is_file "${output_dir}/favicon.png" &&
file -b --mime-type "${output_dir}/favicon.png" >./favicon_filetype &&
printf "image/png\n" | test_cmp - ./favicon_filetype &&
rm ./favicon_filetype
ok 15 # skip TWO_PROJECTS: should have a favicon (missing TWO_PROJECTS)
skipping test: TWO_PROJECTS: should have a home page and a prototype
test_path_is_file "${output_dir}/index.html" &&
grep -qF "<script src=" "${output_dir}/index.html" &&
test_path_is_file "${output_dir}/prototype/index.html" &&
grep -qF "<script src=" "${output_dir}/prototype/index.html"
ok 16 # skip TWO_PROJECTS: should have a home page and a prototype (missing TWO_PROJECTS)
skipping test: TWO_PROJECTS: should have a discord-invite with redirect
file="${output_dir}/discord-invite/index.html" &&
test_path_is_file "${file}" &&
test_must_fail grep -qF "<script src=" "${file}" &&
url="https://discord.gg/tsBTgc9" &&
needle="<meta http-equiv=\"refresh\" content=\"0;url=$url\" />" &&
grep -qxF "${needle}" "${file}"
ok 17 # skip TWO_PROJECTS: should have a discord-invite with redirect (missing TWO_PROJECTS)
skipping test: TWO_PROJECTS: should have project ids loaded into env
grep -F "PROJECT_IDS" out &&
grep -xF "PROJECT_IDS: [\"sourcecred-test/example-git\",\"sourcecred-test/example-github\"]" out
ok 18 # skip TWO_PROJECTS: should have project ids loaded into env (missing TWO_PROJECTS)
skipping test: TWO_PROJECTS: should have data for the two projects
# encoded ids for sourcecred-test/example-git and sourcecred-test/example-github
for id in c291cmNlY3JlZC10ZXN0L2V4YW1wbGUtZ2l0aHVi c291cmNlY3JlZC10ZXN0L2V4YW1wbGUtZ2l0; do
test -s "${api_dir}/projects/${id}/cred.json" &&
test -s "${api_dir}/projects/${id}/graph.json" ||
return
done
ok 19 # skip TWO_PROJECTS: should have data for the two projects (missing TWO_PROJECTS)
skipping test: TWO_PROJECTS: should have a correct CNAME record
test_path_is_file "${output_dir}/CNAME" &&
printf "sourcecred.example.com" | test_cmp - "${output_dir}/CNAME"
ok 20 # skip TWO_PROJECTS: should have a correct CNAME record (missing TWO_PROJECTS)
skipping test: NO_PROJECTS: should have a favicon
test_path_is_file "${output_dir}/favicon.png" &&
file -b --mime-type "${output_dir}/favicon.png" >./favicon_filetype &&
printf "image/png\n" | test_cmp - ./favicon_filetype &&
rm ./favicon_filetype
ok 21 # skip NO_PROJECTS: should have a favicon (missing NO_PROJECTS)
skipping test: NO_PROJECTS: should have a home page and a prototype
test_path_is_file "${output_dir}/index.html" &&
grep -qF "<script src=" "${output_dir}/index.html" &&
test_path_is_file "${output_dir}/prototype/index.html" &&
grep -qF "<script src=" "${output_dir}/prototype/index.html"
ok 22 # skip NO_PROJECTS: should have a home page and a prototype (missing NO_PROJECTS)
skipping test: NO_PROJECTS: should have a discord-invite with redirect
file="${output_dir}/discord-invite/index.html" &&
test_path_is_file "${file}" &&
test_must_fail grep -qF "<script src=" "${file}" &&
url="https://discord.gg/tsBTgc9" &&
needle="<meta http-equiv=\"refresh\" content=\"0;url=$url\" />" &&
grep -qxF "${needle}" "${file}"
ok 23 # skip NO_PROJECTS: should have a discord-invite with redirect (missing NO_PROJECTS)
skipping test: NO_REPOS: should have empty list of project ids loaded into env
grep -F "PROJECT_IDS" out &&
grep -xF "PROJECT_IDS: []" out
ok 24 # skip NO_REPOS: should have empty list of project ids loaded into env (missing NO_PROJECTS)
skipping test: NO_REPOS: should not have repository data
for id in c291cmNlY3JlZC9leGFtcGxlLWdpdA== c291cmNlY3JlZC9leGFtcGxlLWdpdGh1Yg==; do
for file in graph.json cred.json; do
test_must_fail test -f "${api_dir}/projects/${id}/${file}" || return
done
done
ok 25 # skip NO_REPOS: should not have repository data (missing NO_REPOS)
skipping test: NO_REPOS: should have no CNAME record
test_must_fail test -e "${output_dir}/CNAME"
ok 26 # skip NO_REPOS: should have no CNAME record (missing NO_REPOS)
# failed 1 among 26 test(s)
1..26
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/26 subtests
(less 14 skipped subtests: 11 okay)
test_cli_scores.t ............................................
expecting success:
toplevel="$(git -C "$(dirname "$0")" rev-parse --show-toplevel)" &&
snapshot_directory="${toplevel}/sharness/__snapshots__/" &&
SOURCECRED_DIRECTORY="${snapshot_directory}/example-github-load" &&
export SOURCECRED_DIRECTORY &&
snapshot_file="${snapshot_directory}/example-github-scores.json" &&
if [ -z "${SOURCECRED_BIN}" ]; then
printf >&2 "warn: missing environment variable SOURCECRED_BIN\n" &&
printf >&2 "warn: using repository bin directory as fallback\n" &&
export SOURCECRED_BIN="${toplevel}/bin"
fi &&
export NODE_PATH="${toplevel}/node_modules${NODE_PATH:+:${NODE_PATH}}" &&
test_set_prereq SETUP
ok 1 - environment and Node linking setup
expecting success:
test_must_fail run_without_validation scores &&
grep -q "no project ID provided" err &&
grep -q "sourcecred help scores" err
ok 2 - should print help message when called without args
expecting success:
run help scores &&
grep -q "usage: sourcecred scores PROJECT_ID" out
ok 3 - help should print usage info
expecting success:
run scores --help &&
grep -q "usage: sourcecred scores PROJECT_ID" out
ok 4 - --help should print usage info
expecting success:
test_must_fail run_without_validation scores sourcecred/sourcecred torvalds/linux &&
grep -q "fatal: multiple project IDs provided" err
ok 5 - should fail for multiple projects
expecting success:
test_must_fail run_without_validation scores torvalds/linux &&
grep -q "fatal: project torvalds/linux not loaded" err
ok 6 - should fail for unloaded project
skipping test: should update the snapshot
run scores sourcecred-test/example-github &&
mv out "${snapshot_file}"
ok 7 # skip should update the snapshot (missing UPDATE_SNAPSHOT of SETUP,UPDATE_SNAPSHOT)
expecting success:
run scores sourcecred-test/example-github &&
diff -u out ${snapshot_file}
ok 8 - should be identical to the snapshot
# passed all 8 test(s)
1..8
ok
test_js_tests_have_top_level_describe_block_with_filename.t ..
expecting success:
root="$(git rev-parse --show-toplevel)" &&
(cd "${root}/src" && git ls-files -z "*.test.js") >test_files_z &&
tr "\0" "\n" <test_files_z >test_files &&
test_set_prereq SETUP
ok 1 - setup
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("analysis/nodeScore", () => {
ok 2 - test file: analysis/nodeScore.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("analysis/pagerankNodeDecomposition", () => {
ok 3 - test file: analysis/pagerankNodeDecomposition.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("src/analysis/timeline/distributionToCred", () => {
ok 4 - test file: analysis/timeline/distributionToCred.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("src/analysis/timeline/filterTimelineCred", () => {
ok 5 - test file: analysis/timeline/filterTimelineCred.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("src/analysis/timeline/interval", () => {
ok 6 - test file: analysis/timeline/interval.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("src/analysis/timeline/timelineCred", () => {
ok 7 - test file: analysis/timeline/timelineCred.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("src/analysis/timeline/timelinePagerank", () => {
ok 8 - test file: analysis/timeline/timelinePagerank.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("src/analysis/weightEvaluator", () => {
ok 9 - test file: analysis/weightEvaluator.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("analysis/weights", () => {
ok 10 - test file: analysis/weights.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("analysis/weightsToEdgeEvaluator", () => {
ok 11 - test file: analysis/weightsToEdgeEvaluator.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("api/load", () => {
ok 12 - test file: api/load.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("cli/clear", () => {
ok 13 - test file: cli/clear.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("cli/command", () => {
ok 14 - test file: cli/command.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("cli/common", () => {
ok 15 - test file: cli/common.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("cli/help", () => {
ok 16 - test file: cli/help.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("cli/load", () => {
ok 17 - test file: cli/load.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("cli/main", () => {
ok 18 - test file: cli/main.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("cli/sourcecred", () => {
ok 19 - test file: cli/sourcecred.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("cli/testUtil", () => {
ok 20 - test file: cli/testUtil.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/address", () => {
ok 21 - test file: core/address.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/attribution/distribution", () => {
ok 22 - test file: core/attribution/distribution.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/attribution/graphToMarkovChain", () => {
ok 23 - test file: core/attribution/graphToMarkovChain.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/attribution/markovChain", () => {
ok 24 - test file: core/attribution/markovChain.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/attribution/nodeDistribution", () => {
ok 25 - test file: core/attribution/nodeDistribution.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/graph", () => {
ok 26 - test file: core/graph.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/pagerankGraph", () => {
ok 27 - test file: core/pagerankGraph.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/project", () => {
ok 28 - test file: core/project.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/project_io", () => {
ok 29 - test file: core/project_io.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/repoId", () => {
ok 30 - test file: core/repoId.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/repoIdRegistry", () => {
ok 31 - test file: core/repoIdRegistry.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/trie", () => {
ok 32 - test file: core/trie.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/version", () => {
ok 33 - test file: core/version.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("explorer/legacy/App", () => {
ok 34 - test file: explorer/legacy/App.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("explorer/legacy/pagerankTable/Aggregation", () => {
ok 35 - test file: explorer/legacy/pagerankTable/Aggregation.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("explorer/legacy/pagerankTable/Connection", () => {
ok 36 - test file: explorer/legacy/pagerankTable/Connection.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("explorer/legacy/pagerankTable/Node", () => {
ok 37 - test file: explorer/legacy/pagerankTable/Node.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("explorer/legacy/pagerankTable/Table", () => {
ok 38 - test file: explorer/legacy/pagerankTable/Table.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("explorer/legacy/pagerankTable/TableRow", () => {
ok 39 - test file: explorer/legacy/pagerankTable/TableRow.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("explorer/legacy/pagerankTable/aggregate", () => {
ok 40 - test file: explorer/legacy/pagerankTable/aggregate.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("explorer/legacy/state", () => {
ok 41 - test file: explorer/legacy/state.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("explorer/weights/EdgeTypeConfig", () => {
ok 42 - test file: explorer/weights/EdgeTypeConfig.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("explorer/weights/NodeTypeConfig", () => {
ok 43 - test file: explorer/weights/NodeTypeConfig.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("explorer/weights/WeightSlider", () => {
ok 44 - test file: explorer/weights/WeightSlider.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("graphql/generateFlowTypes", () => {
ok 45 - test file: graphql/generateFlowTypes.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("graphql/mirror", () => {
ok 46 - test file: graphql/mirror.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("graphql/queries", () => {
ok 47 - test file: graphql/queries.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("graphql/schema", () => {
ok 48 - test file: graphql/schema.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("homepage/routeData", () => {
ok 49 - test file: homepage/routeData.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/discourse/createGraph", () => {
ok 50 - test file: plugins/discourse/createGraph.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/discourse/fetch", () => {
ok 51 - test file: plugins/discourse/fetch.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/discourse/mirror", () => {
ok 52 - test file: plugins/discourse/mirror.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe.skip("plugins/git/createGraph", () => {
ok 53 - test file: plugins/git/createGraph.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/git/edges", () => {
ok 54 - test file: plugins/git/edges.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/git/example/exampleRepo", () => {
ok 55 - test file: plugins/git/example/exampleRepo.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/git/loadRepository", () => {
ok 56 - test file: plugins/git/loadRepository.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/git/nodes", () => {
ok 57 - test file: plugins/git/nodes.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/git/render", () => {
ok 58 - test file: plugins/git/render.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/github/createGraph", () => {
ok 59 - test file: plugins/github/createGraph.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/github/edges", () => {
ok 60 - test file: plugins/github/edges.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/github/fetchGithubRepo", () => {
ok 61 - test file: plugins/github/fetchGithubRepo.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("src/plugins/github/githubGitGateway", () => {
ok 62 - test file: plugins/github/githubGitGateway.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/github/graphqlTypes", () => {
ok 63 - test file: plugins/github/graphqlTypes.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/github/nodes", () => {
ok 64 - test file: plugins/github/nodes.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/github/parseMarkdown", () => {
ok 65 - test file: plugins/github/parseMarkdown.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/github/parseReferences", () => {
ok 66 - test file: plugins/github/parseReferences.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/github/relationalView", () => {
ok 67 - test file: plugins/github/relationalView.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/github/render", () => {
ok 68 - test file: plugins/github/render.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/github/schema", () => {
ok 69 - test file: plugins/github/schema.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/github/specToProject", () => {
ok 70 - test file: plugins/github/specToProject.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/github/urlIdParse", () => {
ok 71 - test file: plugins/github/urlIdParse.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("util/compat", () => {
ok 72 - test file: util/compat.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("util/dedent", () => {
ok 73 - test file: util/dedent.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("util/map", () => {
ok 74 - test file: util/map.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("util/null", () => {
ok 75 - test file: util/null.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("util/pathNormalize", () => {
ok 76 - test file: util/pathNormalize.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("util/taskReporter", () => {
ok 77 - test file: util/taskReporter.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("webutil/Link", () => {
ok 78 - test file: webutil/Link.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("webutil/assets", () => {
ok 79 - test file: webutil/assets.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("webutil/checkedLocalStore", () => {
ok 80 - test file: webutil/checkedLocalStore.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("webutil/createRelativeHistory", () => {
ok 81 - test file: webutil/createRelativeHistory.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("webutil/memoryLocalStore", () => {
ok 82 - test file: webutil/memoryLocalStore.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("webutil/withAssets", () => {
ok 83 - test file: webutil/withAssets.test.js
# passed all 83 test(s)
1..83
ok
test_load_example_github.t ...................................
expecting success:
toplevel="$(git -C "$(dirname "$0")" rev-parse --show-toplevel)" &&
snapshot_directory="${toplevel}/sharness/__snapshots__/example-github-load" &&
if [ -z "${SOURCECRED_BIN}" ]; then
printf >&2 "warn: missing environment variable SOURCECRED_BIN\n" &&
printf >&2 "warn: using repository bin directory as fallback\n" &&
export SOURCECRED_BIN="${toplevel}/bin"
fi &&
export NODE_PATH="${toplevel}/node_modules${NODE_PATH:+:${NODE_PATH}}" &&
test_set_prereq SETUP
ok 1 - environment and Node linking setup
expecting success:
SOURCECRED_DIRECTORY=. node "${SOURCECRED_BIN}/sourcecred.js" \
load sourcecred-test/example-github &&
rm -rf cache &&
test_set_prereq LOADED_GITHUB
GO load-sourcecred-test/example-github
GO github/sourcecred-test/example-github
DONE github/sourcecred-test/example-github: 4s
GO compute-cred
DONE compute-cred: 68ms
DONE load-sourcecred-test/example-github: 4s
ok 2 - should load sourcecred-test/example-github
skipping test: should update the snapshot
rm -rf "$snapshot_directory" &&
cp -r . "$snapshot_directory"
ok 3 # skip should update the snapshot (missing UPDATE_SNAPSHOT of LOADED_GITHUB,UPDATE_SNAPSHOT)
expecting success:
diff -qr . "$snapshot_directory"
ok 4 - should be identical to the snapshot
# passed all 4 test(s)
1..4
ok
test_no_raw_anchor_elements.t ................................
expecting success:
test_must_fail git grep -nF "</a>" \
":/src/*.js" \
":(exclude,top)*/__snapshots__/*" \
":(exclude,top)*/snapshots/*" \
":(exclude,top)src/webutil/Link.js" \
;
ok 1 - application components must use <Link> instead of <a>
# passed all 1 test(s)
1..1
ok
Test Summary Report
-------------------
test_build_static_site.t (Wstat: 256 Tests: 26 Failed: 1)
Failed test: 12
Non-zero exit status: 1
Files=6, Tests=123, 11 wallclock secs ( 0.09 usr 0.02 sys + 2.04 cusr 1.08 csys = 3.23 CPU)
Result: FAIL
Contents of stderr:
make: *** [prove] Error 1
error Command failed with exit code 2.
PASS lint
Full results
PASS ensure-flow-typing
PASS check-stopships
PASS check-pretty
PASS lint
PASS flow
Contents of stdout:
No errors!
PASS unit
Contents of stderr:
PASS src/plugins/discourse/mirror.test.js
PASS src/plugins/git/example/exampleRepo.test.js
PASS src/core/pagerankGraph.test.js
PASS src/plugins/github/relationalView.test.js
PASS src/plugins/git/render.test.js
PASS src/cli/load.test.js
PASS src/plugins/github/render.test.js
PASS src/cli/main.test.js
PASS src/cli/help.test.js
PASS src/plugins/github/graphqlTypes.test.js
fatal: bad object 0000000000000000000000000000000000000000
fatal: Needed a single revision
PASS src/plugins/git/loadRepository.test.js (5.232s)
PASS src/plugins/discourse/fetch.test.js
PASS src/plugins/github/nodes.test.js
PASS src/plugins/discourse/createGraph.test.js
PASS src/plugins/github/createGraph.test.js
PASS src/core/address.test.js
PASS src/analysis/timeline/interval.test.js
PASS src/plugins/github/parseReferences.test.js
PASS src/plugins/github/urlIdParse.test.js
PASS src/analysis/timeline/timelineCred.test.js
PASS src/cli/sourcecred.test.js
PASS src/analysis/weightsToEdgeEvaluator.test.js
PASS src/analysis/pagerankNodeDecomposition.test.js
PASS src/plugins/github/parseMarkdown.test.js
PASS src/plugins/github/edges.test.js
PASS src/analysis/timeline/timelinePagerank.test.js
PASS src/core/repoIdRegistry.test.js
PASS src/plugins/github/githubGitGateway.test.js
PASS src/plugins/git/nodes.test.js
PASS src/plugins/github/specToProject.test.js
PASS src/analysis/nodeScore.test.js
PASS src/cli/testUtil.test.js
PASS src/cli/command.test.js
PASS src/analysis/weightEvaluator.test.js
PASS src/cli/common.test.js
PASS src/analysis/weights.test.js
PASS src/plugins/git/edges.test.js
PASS src/plugins/github/schema.test.js
PASS src/analysis/timeline/distributionToCred.test.js
PASS src/cli/clear.test.js
PASS src/webutil/createRelativeHistory.test.js
PASS src/api/load.test.js
PASS src/explorer/legacy/pagerankTable/Connection.test.js
PASS src/explorer/legacy/pagerankTable/Node.test.js
PASS src/explorer/legacy/state.test.js
PASS src/explorer/legacy/pagerankTable/Table.test.js
PASS src/explorer/legacy/App.test.js
PASS src/webutil/Link.test.js
PASS src/explorer/legacy/pagerankTable/TableRow.test.js
PASS src/graphql/generateFlowTypes.test.js
PASS src/explorer/weights/EdgeTypeConfig.test.js
PASS src/explorer/legacy/pagerankTable/Aggregation.test.js
PASS src/core/graph.test.js
PASS src/analysis/timeline/filterTimelineCred.test.js
PASS src/explorer/weights/NodeTypeConfig.test.js
PASS src/explorer/weights/WeightSlider.test.js
PASS src/util/map.test.js
PASS src/util/null.test.js
PASS src/core/attribution/markovChain.test.js
PASS src/graphql/mirror.test.js (6.786s)
PASS src/explorer/legacy/pagerankTable/aggregate.test.js
PASS src/core/project_io.test.js
PASS src/webutil/assets.test.js
PASS src/core/repoId.test.js
PASS src/graphql/schema.test.js
PASS src/core/trie.test.js
PASS src/util/taskReporter.test.js
PASS src/core/attribution/graphToMarkovChain.test.js
PASS src/util/pathNormalize.test.js
PASS src/webutil/withAssets.test.js
PASS src/core/version.test.js
PASS src/plugins/github/fetchGithubRepo.test.js
PASS src/webutil/memoryLocalStore.test.js
PASS src/core/attribution/nodeDistribution.test.js
PASS src/graphql/queries.test.js
PASS src/core/attribution/distribution.test.js
PASS src/webutil/checkedLocalStore.test.js
PASS src/homepage/routeData.test.js
PASS src/util/dedent.test.js
PASS src/util/compat.test.js
PASS src/core/project.test.js
Test Suites: 1 skipped, 81 passed, 81 of 82 total
Tests: 3 skipped, 1550 passed, 1553 total
Snapshots: 159 passed, 159 total
Time: 20.043s
Ran all test suites.
PASS check-gnu-coreutils
PASS backend
Contents of stdout:
Hash: 70858edfc2309a35df46
Version: webpack 4.39.2
Time: 8475ms
Built at: 09/08/2019 1:22:40 AM
Asset Size Chunks Chunk Names
createExampleRepo.js 21.8 KiB createExampleRepo [emitted] createExampleRepo
fetchAndPrintGithubOrg.js 135 KiB fetchAndPrintGithubOrg [emitted] fetchAndPrintGithubOrg
fetchAndPrintGithubRepo.js 132 KiB fetchAndPrintGithubRepo [emitted] fetchAndPrintGithubRepo
generateGithubGraphqlFlowTypes.js 24.9 KiB generateGithubGraphqlFlowTypes [emitted] generateGithubGraphqlFlowTypes
sourcecred.js 406 KiB sourcecred [emitted] sourcecred
Entrypoint sourcecred = sourcecred.js
Entrypoint generateGithubGraphqlFlowTypes = generateGithubGraphqlFlowTypes.js
Entrypoint fetchAndPrintGithubRepo = fetchAndPrintGithubRepo.js
Entrypoint fetchAndPrintGithubOrg = fetchAndPrintGithubOrg.js
Entrypoint createExampleRepo = createExampleRepo.js
[./src/cli/command.js] 242 bytes {sourcecred} [built]
[./src/cli/main.js] 482 bytes {sourcecred} [built]
[./src/cli/sourcecred.js] 735 bytes {sourcecred} [built]
[./src/core/repoId.js] 858 bytes {sourcecred} {fetchAndPrintGithubRepo} {fetchAndPrintGithubOrg} [built]
[./src/plugins/git/bin/createExampleRepo.js] 1.13 KiB {createExampleRepo} [built]
[./src/plugins/git/example/exampleRepo.js] 3.66 KiB {createExampleRepo} [built]
[./src/plugins/github/bin/fetchAndPrintGithubOrg.js] 1.17 KiB {fetchAndPrintGithubOrg} [built]
[./src/plugins/github/bin/fetchAndPrintGithubRepo.js] 1.21 KiB {fetchAndPrintGithubRepo} [built]
[./src/plugins/github/bin/generateGraphqlFlowTypes.js] 115 bytes {generateGithubGraphqlFlowTypes} [built]
[./src/plugins/github/fetchGithubOrg.js] 2.36 KiB {sourcecred} {fetchAndPrintGithubOrg} [built]
[./src/plugins/github/fetchGithubRepo.js] 6.26 KiB {sourcecred} {fetchAndPrintGithubRepo} {fetchAndPrintGithubOrg} [built]
[./src/plugins/github/generateGraphqlFlowTypes.js] 1.26 KiB {generateGithubGraphqlFlowTypes} [built]
[./src/tools/entry.js] 509 bytes {sourcecred} [built]
[./src/util/null.js] 3.1 KiB {sourcecred} {fetchAndPrintGithubRepo} {fetchAndPrintGithubOrg} {createExampleRepo} [built]
[fs] external "fs" 42 bytes {createExampleRepo} [built]
+ 76 hidden modules
Contents of stderr:
Removing contents of build directory: /var/folders/qd/1fl34l356hgg1b0tg8hpcnxr0000gn/T/sourcecred-test-29351l6q4FBhlvd9j
(node:29369) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
FAIL sharness-full
Exit code: 2
Contents of stdout:
*** prove ***
dummy.t ......................................................
expecting success: true
ok 1 - should trivially pass
# passed all 1 test(s)
1..1
ok
test_build_static_site.t .....................................
expecting success:
run --help >msg 2>err &&
test_must_be_empty err &&
test_path_is_file msg &&
grep -qF "usage: build_static_site.sh" msg
ok 1 - should print a help message
expecting success:
test_must_fail run 2>err &&
grep -qF -- "target directory not specified" err
ok 2 - should fail with no target
expecting success:
test_must_fail run --target 2>err &&
grep -qF -- "missing value for --target" err
ok 3 - should fail with missing target value
expecting success:
mkdir one two &&
test_must_fail run --target one --target two 2>err &&
grep -qF -- "--target specified multiple times" err
ok 4 - should fail with multiple targets
expecting success:
printf "important\nstuff" >important_data &&
test_must_fail run --target important_data 2>err &&
grep -qF -- "target is not a directory" err &&
printf "important\nstuff" | test_cmp - important_data
ok 5 - should fail with a file as target
expecting success:
printf "important\nstuff" >important_data &&
test_must_fail run --target important_data/something 2>err &&
grep -q -- "cannot create directory.*Not a directory" err &&
printf "important\nstuff" | test_cmp - important_data
ok 6 - should fail with a target under a file
expecting success:
mkdir important_dir &&
printf "redacted\n" >important_dir/.wallet.dat &&
test_must_fail run --target important_dir 2>err &&
grep -qF -- "target directory is nonempty: important_dir" err &&
printf "redacted\n" | test_cmp - important_dir/.wallet.dat
ok 7 - should fail with a nonempty directory as target
expecting success:
test_must_fail run --target putative_output --project 2>err &&
grep -qF -- "missing value for --project" err &&
printf "redacted\n" | test_cmp - important_dir/.wallet.dat
ok 8 - should fail with missing project value
expecting success:
test_must_fail run --target putative_output --cname 2>err &&
grep -qF -- "missing value for --cname" err &&
printf "redacted\n" | test_cmp - important_dir/.wallet.dat
ok 9 - should fail with missing cname value
expecting success:
test_must_fail run --target putative_output --cname "" 2>err &&
grep -qF -- "empty value for --cname" err &&
printf "redacted\n" | test_cmp - important_dir/.wallet.dat
ok 10 - should fail with empty cname
expecting success:
test_must_fail run --target putative_output \
--cname a.com --cname b.com 2>err &&
grep -qF -- "--cname specified multiple times" err &&
printf "redacted\n" | test_cmp - important_dir/.wallet.dat
ok 11 - should fail with multiple cname values
expecting success:
if [ -n "${unsafe_arg}" ]; then
printf >&2 "fatal: potentially unsafe argument: %s\n" "${arg}" &&
false
fi &&
run --target build_output/output_TWO_PROJECTS --no-backend --cname sourcecred.example.com --project sourcecred-test/example-git --project sourcecred-test/example-github >out 2>err &&
test_must_fail grep -vF \
-e "Removing contents of build directory: " \
-e "info: loading project" \
-e "DeprecationWarning: Tapable.plugin is deprecated." \
err &&
test_path_is_dir "${output_dir}" &&
test_path_is_dir "${api_dir}" &&
test_set_prereq "${prereq_name}"
not ok 12 - TWO_PROJECTS: should build the site with two projects and a CNAME
#
# if [ -n "${unsafe_arg}" ]; then
# printf >&2 "fatal: potentially unsafe argument: %s
# " "${arg}" &&
# false
# fi &&
# run --target build_output/output_TWO_PROJECTS --no-backend --cname sourcecred.example.com --project sourcecred-test/example-git --project sourcecred-test/example-github >out 2>err &&
# test_must_fail grep -vF \
# -e "Removing contents of build directory: " \
# -e "info: loading project" \
# -e "DeprecationWarning: Tapable.plugin is deprecated." \
# err &&
# test_path_is_dir "${output_dir}" &&
# test_path_is_dir "${api_dir}" &&
# test_set_prereq "${prereq_name}"
#
skipping test: TWO_PROJECTS: should have no cache
test_must_fail test_path_is_dir "${api_dir}/cache"
ok 13 # skip TWO_PROJECTS: should have no cache (missing TWO_PROJECTS)
skipping test: TWO_PROJECTS: should have a bundle
js_bundle_path= &&
js_bundle_path_glob="${output_dir}"/static/js/main.*.js &&
for main_js in ${js_bundle_path_glob}; do
if ! [ -e "${main_js}" ]; then
printf >&2 "fatal: no main bundle found\n" &&
return 1
elif [ -n "${js_bundle_path}" ]; then
printf >&2 "fatal: multiple main bundles found:\n" &&
printf >&2 " %s\n" ${js_bundle_path_glob} &&
return 1
else
js_bundle_path="${main_js}"
fi
done
ok 14 # skip TWO_PROJECTS: should have a bundle (missing TWO_PROJECTS)
skipping test: TWO_PROJECTS: should have a favicon
test_path_is_file "${output_dir}/favicon.png" &&
file -b --mime-type "${output_dir}/favicon.png" >./favicon_filetype &&
printf "image/png\n" | test_cmp - ./favicon_filetype &&
rm ./favicon_filetype
ok 15 # skip TWO_PROJECTS: should have a favicon (missing TWO_PROJECTS)
skipping test: TWO_PROJECTS: should have a home page and a prototype
test_path_is_file "${output_dir}/index.html" &&
grep -qF "<script src=" "${output_dir}/index.html" &&
test_path_is_file "${output_dir}/prototype/index.html" &&
grep -qF "<script src=" "${output_dir}/prototype/index.html"
ok 16 # skip TWO_PROJECTS: should have a home page and a prototype (missing TWO_PROJECTS)
skipping test: TWO_PROJECTS: should have a discord-invite with redirect
file="${output_dir}/discord-invite/index.html" &&
test_path_is_file "${file}" &&
test_must_fail grep -qF "<script src=" "${file}" &&
url="https://discord.gg/tsBTgc9" &&
needle="<meta http-equiv=\"refresh\" content=\"0;url=$url\" />" &&
grep -qxF "${needle}" "${file}"
ok 17 # skip TWO_PROJECTS: should have a discord-invite with redirect (missing TWO_PROJECTS)
skipping test: TWO_PROJECTS: should have project ids loaded into env
grep -F "PROJECT_IDS" out &&
grep -xF "PROJECT_IDS: [\"sourcecred-test/example-git\",\"sourcecred-test/example-github\"]" out
ok 18 # skip TWO_PROJECTS: should have project ids loaded into env (missing TWO_PROJECTS)
skipping test: TWO_PROJECTS: should have data for the two projects
# encoded ids for sourcecred-test/example-git and sourcecred-test/example-github
for id in c291cmNlY3JlZC10ZXN0L2V4YW1wbGUtZ2l0aHVi c291cmNlY3JlZC10ZXN0L2V4YW1wbGUtZ2l0; do
test -s "${api_dir}/projects/${id}/cred.json" &&
test -s "${api_dir}/projects/${id}/graph.json" ||
return
done
ok 19 # skip TWO_PROJECTS: should have data for the two projects (missing TWO_PROJECTS)
skipping test: TWO_PROJECTS: should have a correct CNAME record
test_path_is_file "${output_dir}/CNAME" &&
printf "sourcecred.example.com" | test_cmp - "${output_dir}/CNAME"
ok 20 # skip TWO_PROJECTS: should have a correct CNAME record (missing TWO_PROJECTS)
skipping test: NO_PROJECTS: should have a favicon
test_path_is_file "${output_dir}/favicon.png" &&
file -b --mime-type "${output_dir}/favicon.png" >./favicon_filetype &&
printf "image/png\n" | test_cmp - ./favicon_filetype &&
rm ./favicon_filetype
ok 21 # skip NO_PROJECTS: should have a favicon (missing NO_PROJECTS)
skipping test: NO_PROJECTS: should have a home page and a prototype
test_path_is_file "${output_dir}/index.html" &&
grep -qF "<script src=" "${output_dir}/index.html" &&
test_path_is_file "${output_dir}/prototype/index.html" &&
grep -qF "<script src=" "${output_dir}/prototype/index.html"
ok 22 # skip NO_PROJECTS: should have a home page and a prototype (missing NO_PROJECTS)
skipping test: NO_PROJECTS: should have a discord-invite with redirect
file="${output_dir}/discord-invite/index.html" &&
test_path_is_file "${file}" &&
test_must_fail grep -qF "<script src=" "${file}" &&
url="https://discord.gg/tsBTgc9" &&
needle="<meta http-equiv=\"refresh\" content=\"0;url=$url\" />" &&
grep -qxF "${needle}" "${file}"
ok 23 # skip NO_PROJECTS: should have a discord-invite with redirect (missing NO_PROJECTS)
skipping test: NO_REPOS: should have empty list of project ids loaded into env
grep -F "PROJECT_IDS" out &&
grep -xF "PROJECT_IDS: []" out
ok 24 # skip NO_REPOS: should have empty list of project ids loaded into env (missing NO_PROJECTS)
skipping test: NO_REPOS: should not have repository data
for id in c291cmNlY3JlZC9leGFtcGxlLWdpdA== c291cmNlY3JlZC9leGFtcGxlLWdpdGh1Yg==; do
for file in graph.json cred.json; do
test_must_fail test -f "${api_dir}/projects/${id}/${file}" || return
done
done
ok 25 # skip NO_REPOS: should not have repository data (missing NO_REPOS)
skipping test: NO_REPOS: should have no CNAME record
test_must_fail test -e "${output_dir}/CNAME"
ok 26 # skip NO_REPOS: should have no CNAME record (missing NO_REPOS)
# failed 1 among 26 test(s)
1..26
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/26 subtests
(less 14 skipped subtests: 11 okay)
test_cli_scores.t ............................................
expecting success:
toplevel="$(git -C "$(dirname "$0")" rev-parse --show-toplevel)" &&
snapshot_directory="${toplevel}/sharness/__snapshots__/" &&
SOURCECRED_DIRECTORY="${snapshot_directory}/example-github-load" &&
export SOURCECRED_DIRECTORY &&
snapshot_file="${snapshot_directory}/example-github-scores.json" &&
if [ -z "${SOURCECRED_BIN}" ]; then
printf >&2 "warn: missing environment variable SOURCECRED_BIN\n" &&
printf >&2 "warn: using repository bin directory as fallback\n" &&
export SOURCECRED_BIN="${toplevel}/bin"
fi &&
export NODE_PATH="${toplevel}/node_modules${NODE_PATH:+:${NODE_PATH}}" &&
test_set_prereq SETUP
ok 1 - environment and Node linking setup
expecting success:
test_must_fail run_without_validation scores &&
grep -q "no project ID provided" err &&
grep -q "sourcecred help scores" err
ok 2 - should print help message when called without args
expecting success:
run help scores &&
grep -q "usage: sourcecred scores PROJECT_ID" out
ok 3 - help should print usage info
expecting success:
run scores --help &&
grep -q "usage: sourcecred scores PROJECT_ID" out
ok 4 - --help should print usage info
expecting success:
test_must_fail run_without_validation scores sourcecred/sourcecred torvalds/linux &&
grep -q "fatal: multiple project IDs provided" err
ok 5 - should fail for multiple projects
expecting success:
test_must_fail run_without_validation scores torvalds/linux &&
grep -q "fatal: project torvalds/linux not loaded" err
ok 6 - should fail for unloaded project
skipping test: should update the snapshot
run scores sourcecred-test/example-github &&
mv out "${snapshot_file}"
ok 7 # skip should update the snapshot (missing UPDATE_SNAPSHOT of SETUP,UPDATE_SNAPSHOT)
expecting success:
run scores sourcecred-test/example-github &&
diff -u out ${snapshot_file}
ok 8 - should be identical to the snapshot
# passed all 8 test(s)
1..8
ok
test_js_tests_have_top_level_describe_block_with_filename.t ..
expecting success:
root="$(git rev-parse --show-toplevel)" &&
(cd "${root}/src" && git ls-files -z "*.test.js") >test_files_z &&
tr "\0" "\n" <test_files_z >test_files &&
test_set_prereq SETUP
ok 1 - setup
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("analysis/nodeScore", () => {
ok 2 - test file: analysis/nodeScore.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("analysis/pagerankNodeDecomposition", () => {
ok 3 - test file: analysis/pagerankNodeDecomposition.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("src/analysis/timeline/distributionToCred", () => {
ok 4 - test file: analysis/timeline/distributionToCred.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("src/analysis/timeline/filterTimelineCred", () => {
ok 5 - test file: analysis/timeline/filterTimelineCred.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("src/analysis/timeline/interval", () => {
ok 6 - test file: analysis/timeline/interval.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("src/analysis/timeline/timelineCred", () => {
ok 7 - test file: analysis/timeline/timelineCred.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("src/analysis/timeline/timelinePagerank", () => {
ok 8 - test file: analysis/timeline/timelinePagerank.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("src/analysis/weightEvaluator", () => {
ok 9 - test file: analysis/weightEvaluator.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("analysis/weights", () => {
ok 10 - test file: analysis/weights.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("analysis/weightsToEdgeEvaluator", () => {
ok 11 - test file: analysis/weightsToEdgeEvaluator.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("api/load", () => {
ok 12 - test file: api/load.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("cli/clear", () => {
ok 13 - test file: cli/clear.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("cli/command", () => {
ok 14 - test file: cli/command.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("cli/common", () => {
ok 15 - test file: cli/common.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("cli/help", () => {
ok 16 - test file: cli/help.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("cli/load", () => {
ok 17 - test file: cli/load.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("cli/main", () => {
ok 18 - test file: cli/main.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("cli/sourcecred", () => {
ok 19 - test file: cli/sourcecred.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("cli/testUtil", () => {
ok 20 - test file: cli/testUtil.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/address", () => {
ok 21 - test file: core/address.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/attribution/distribution", () => {
ok 22 - test file: core/attribution/distribution.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/attribution/graphToMarkovChain", () => {
ok 23 - test file: core/attribution/graphToMarkovChain.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/attribution/markovChain", () => {
ok 24 - test file: core/attribution/markovChain.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/attribution/nodeDistribution", () => {
ok 25 - test file: core/attribution/nodeDistribution.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/graph", () => {
ok 26 - test file: core/graph.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/pagerankGraph", () => {
ok 27 - test file: core/pagerankGraph.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/project", () => {
ok 28 - test file: core/project.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/project_io", () => {
ok 29 - test file: core/project_io.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/repoId", () => {
ok 30 - test file: core/repoId.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/repoIdRegistry", () => {
ok 31 - test file: core/repoIdRegistry.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/trie", () => {
ok 32 - test file: core/trie.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("core/version", () => {
ok 33 - test file: core/version.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("explorer/legacy/App", () => {
ok 34 - test file: explorer/legacy/App.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("explorer/legacy/pagerankTable/Aggregation", () => {
ok 35 - test file: explorer/legacy/pagerankTable/Aggregation.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("explorer/legacy/pagerankTable/Connection", () => {
ok 36 - test file: explorer/legacy/pagerankTable/Connection.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("explorer/legacy/pagerankTable/Node", () => {
ok 37 - test file: explorer/legacy/pagerankTable/Node.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("explorer/legacy/pagerankTable/Table", () => {
ok 38 - test file: explorer/legacy/pagerankTable/Table.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("explorer/legacy/pagerankTable/TableRow", () => {
ok 39 - test file: explorer/legacy/pagerankTable/TableRow.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("explorer/legacy/pagerankTable/aggregate", () => {
ok 40 - test file: explorer/legacy/pagerankTable/aggregate.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("explorer/legacy/state", () => {
ok 41 - test file: explorer/legacy/state.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("explorer/weights/EdgeTypeConfig", () => {
ok 42 - test file: explorer/weights/EdgeTypeConfig.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("explorer/weights/NodeTypeConfig", () => {
ok 43 - test file: explorer/weights/NodeTypeConfig.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("explorer/weights/WeightSlider", () => {
ok 44 - test file: explorer/weights/WeightSlider.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("graphql/generateFlowTypes", () => {
ok 45 - test file: graphql/generateFlowTypes.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("graphql/mirror", () => {
ok 46 - test file: graphql/mirror.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("graphql/queries", () => {
ok 47 - test file: graphql/queries.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("graphql/schema", () => {
ok 48 - test file: graphql/schema.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("homepage/routeData", () => {
ok 49 - test file: homepage/routeData.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/discourse/createGraph", () => {
ok 50 - test file: plugins/discourse/createGraph.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/discourse/fetch", () => {
ok 51 - test file: plugins/discourse/fetch.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/discourse/mirror", () => {
ok 52 - test file: plugins/discourse/mirror.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe.skip("plugins/git/createGraph", () => {
ok 53 - test file: plugins/git/createGraph.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/git/edges", () => {
ok 54 - test file: plugins/git/edges.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/git/example/exampleRepo", () => {
ok 55 - test file: plugins/git/example/exampleRepo.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/git/loadRepository", () => {
ok 56 - test file: plugins/git/loadRepository.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/git/nodes", () => {
ok 57 - test file: plugins/git/nodes.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/git/render", () => {
ok 58 - test file: plugins/git/render.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/github/createGraph", () => {
ok 59 - test file: plugins/github/createGraph.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/github/edges", () => {
ok 60 - test file: plugins/github/edges.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/github/fetchGithubRepo", () => {
ok 61 - test file: plugins/github/fetchGithubRepo.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("src/plugins/github/githubGitGateway", () => {
ok 62 - test file: plugins/github/githubGitGateway.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/github/graphqlTypes", () => {
ok 63 - test file: plugins/github/graphqlTypes.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/github/nodes", () => {
ok 64 - test file: plugins/github/nodes.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/github/parseMarkdown", () => {
ok 65 - test file: plugins/github/parseMarkdown.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/github/parseReferences", () => {
ok 66 - test file: plugins/github/parseReferences.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/github/relationalView", () => {
ok 67 - test file: plugins/github/relationalView.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/github/render", () => {
ok 68 - test file: plugins/github/render.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/github/schema", () => {
ok 69 - test file: plugins/github/schema.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/github/specToProject", () => {
ok 70 - test file: plugins/github/specToProject.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("plugins/github/urlIdParse", () => {
ok 71 - test file: plugins/github/urlIdParse.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("util/compat", () => {
ok 72 - test file: util/compat.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("util/dedent", () => {
ok 73 - test file: util/dedent.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("util/map", () => {
ok 74 - test file: util/map.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("util/null", () => {
ok 75 - test file: util/null.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("util/pathNormalize", () => {
ok 76 - test file: util/pathNormalize.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("util/taskReporter", () => {
ok 77 - test file: util/taskReporter.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("webutil/Link", () => {
ok 78 - test file: webutil/Link.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("webutil/assets", () => {
ok 79 - test file: webutil/assets.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("webutil/checkedLocalStore", () => {
ok 80 - test file: webutil/checkedLocalStore.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("webutil/createRelativeHistory", () => {
ok 81 - test file: webutil/createRelativeHistory.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("webutil/memoryLocalStore", () => {
ok 82 - test file: webutil/memoryLocalStore.test.js
expecting success:
grep "^describe\(\.skip\)\?(" -- "${root}/src/${filename}" >describes &&
grep -F -- "${filename%.test.js}" describes
describe("webutil/withAssets", () => {
ok 83 - test file: webutil/withAssets.test.js
# passed all 83 test(s)
1..83
ok
test_load_example_github.t ...................................
expecting success:
toplevel="$(git -C "$(dirname "$0")" rev-parse --show-toplevel)" &&
snapshot_directory="${toplevel}/sharness/__snapshots__/example-github-load" &&
if [ -z "${SOURCECRED_BIN}" ]; then
printf >&2 "warn: missing environment variable SOURCECRED_BIN\n" &&
printf >&2 "warn: using repository bin directory as fallback\n" &&
export SOURCECRED_BIN="${toplevel}/bin"
fi &&
export NODE_PATH="${toplevel}/node_modules${NODE_PATH:+:${NODE_PATH}}" &&
test_set_prereq SETUP
ok 1 - environment and Node linking setup
expecting success:
SOURCECRED_DIRECTORY=. node "${SOURCECRED_BIN}/sourcecred.js" \
load sourcecred-test/example-github &&
rm -rf cache &&
test_set_prereq LOADED_GITHUB
GO load-sourcecred-test/example-github
GO github/sourcecred-test/example-github
DONE github/sourcecred-test/example-github: 4s
GO compute-cred
DONE compute-cred: 68ms
DONE load-sourcecred-test/example-github: 4s
ok 2 - should load sourcecred-test/example-github
skipping test: should update the snapshot
rm -rf "$snapshot_directory" &&
cp -r . "$snapshot_directory"
ok 3 # skip should update the snapshot (missing UPDATE_SNAPSHOT of LOADED_GITHUB,UPDATE_SNAPSHOT)
expecting success:
diff -qr . "$snapshot_directory"
ok 4 - should be identical to the snapshot
# passed all 4 test(s)
1..4
ok
test_no_raw_anchor_elements.t ................................
expecting success:
test_must_fail git grep -nF "</a>" \
":/src/*.js" \
":(exclude,top)*/__snapshots__/*" \
":(exclude,top)*/snapshots/*" \
":(exclude,top)src/webutil/Link.js" \
;
ok 1 - application components must use <Link> instead of <a>
# passed all 1 test(s)
1..1
ok
Test Summary Report
-------------------
test_build_static_site.t (Wstat: 256 Tests: 26 Failed: 1)
Failed test: 12
Non-zero exit status: 1
Files=6, Tests=123, 11 wallclock secs ( 0.09 usr 0.02 sys + 2.04 cusr 1.08 csys = 3.23 CPU)
Result: FAIL
Contents of stderr:
make: *** [prove] Error 1
error Command failed with exit code 2.
PASS fetchGithubRepoTest
PASS fetchGithubOrgTest
Overview
Failed tasks:
- sharness-full
Final result: FAILURE
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.