Debian Codegraph @

debian/tests/pkg-js/test

raw
1 #!/bin/sh
2 set -e
3
4 node - <<'EOF'
5 const Hammer = require('@egjs/hammerjs');
6
7 if (typeof Hammer !== 'function') {
8 throw new Error('expected @egjs/hammerjs to export a constructor');
9 }
10
11 for (const key of ['Manager', 'Recognizer', 'Tap', 'Pan', 'Swipe', 'Pinch', 'Rotate', 'Press']) {
12 if (typeof Hammer[key] !== 'function') {
13 throw new Error(`missing Hammer.${key}`);
14 }
15 }
16 EOF