@financial-times/dotcom-ui-polyfill-service 7.3.0 → 7.3.2

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,18 +1,17 @@
1
1
  {
2
2
  "name": "@financial-times/dotcom-ui-polyfill-service",
3
- "version": "7.3.0",
3
+ "version": "7.3.2",
4
4
  "description": "",
5
5
  "main": "server.js",
6
6
  "browser": "browser.js",
7
7
  "types": "src/index.ts",
8
8
  "scripts": {
9
9
  "test": "echo \"Error: no test specified\" && exit 1",
10
- "tsc": "../../node_modules/.bin/tsc --incremental",
11
10
  "clean": "npm run clean:dist && npm run clean:node_modules",
12
11
  "clean:dist": "rm -rf dist",
13
12
  "clean:node_modules": "rm -rf node_modules",
14
13
  "clean:install": "npm run clean && npm i",
15
- "build:node": "npm run tsc -- --module commonjs --outDir ./dist/node",
14
+ "build:node": "tsc",
16
15
  "build": "npm run build:node",
17
16
  "dev": "npm run build:node -- --watch",
18
17
  "preinstall": "[ \"$INIT_CWD\" != \"$PWD\" ] || npm_config_yes=true npx check-engine"
@@ -24,6 +23,13 @@
24
23
  "node": ">= 14.0.0",
25
24
  "npm": "7.x || 8.x"
26
25
  },
26
+ "files": [
27
+ "dist/",
28
+ "src/",
29
+ "browser.js",
30
+ "component.js",
31
+ "styles.scss"
32
+ ],
27
33
  "repository": {
28
34
  "type": "git",
29
35
  "repository": "https://github.com/Financial-Times/dotcom-page-kit.git",
@@ -36,4 +42,4 @@
36
42
  "devDependencies": {
37
43
  "check-engine": "^1.10.1"
38
44
  }
39
- }
45
+ }
@@ -0,0 +1,18 @@
1
+ import * as subject from '../polyfillServiceURLs'
2
+
3
+ describe('dotcom-ui-polyfill-service', () => {
4
+ it('provides both core and enhanced URLs', () => {
5
+ expect(typeof subject.core()).toBe('string')
6
+ expect(typeof subject.enhanced()).toBe('string')
7
+ })
8
+
9
+ it('joins all of the configured features', () => {
10
+ expect(subject.core()).toMatch(/features=HTMLPictureElement/)
11
+ expect(subject.enhanced()).toMatch(/features=default%2Ces5%2Ces2015/)
12
+ })
13
+
14
+ it('appends the source to each URL', () => {
15
+ expect(subject.core()).toMatch(/source=next/)
16
+ expect(subject.enhanced()).toMatch(/source=next/)
17
+ })
18
+ })