Skip to content

Commit

Permalink
Move earcut test data
Browse files Browse the repository at this point in the history
  • Loading branch information
felixpalmer committed May 31, 2021
1 parent bc31844 commit d6d025b
Show file tree
Hide file tree
Showing 45 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions modules/polygon/test/data/earcut/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Earcut test data

Test data from original [Earcut library tests](https://github.com/mapbox/earcut/tree/master/test), licensed under [ISC license](https://github.com/mapbox/earcut/blob/master/LICENSE).
4 changes: 2 additions & 2 deletions modules/polygon/test/earcut.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {resolve} from 'path';
import test from 'tape-promise/tape';
import {earcut} from '@math.gl/polygon';
import {extractAreas, deviation, flatten} from './earcut-utils';
import expected from './earcut-testdata/expected';
import expected from './data/earcut/expected';

test('indices-2d', function(t) {
const indices = earcut([10, 0, 0, 50, 60, 60, 70, 10]);
Expand Down Expand Up @@ -55,7 +55,7 @@ async function openFile(filePath) {
return data;
}

const FIXTURES_PATH = 'modules/polygon/test/earcut-testdata/fixtures/';
const FIXTURES_PATH = 'modules/polygon/test/data/earcut/fixtures/';

Object.keys(expected.triangles).forEach(id => {
test(id, async t => {
Expand Down

0 comments on commit d6d025b

Please sign in to comment.