Goal
I'd like to mock the requests for tiles made by MapboxGL using Pretender.
Problem
Pretender doesn't intercept those requests
What I've discovered
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>ZoLa | NYC’s Zoning & Land Use Map</title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> | |
<!-- Google tag (gtag.js) --> |
================================================================================= | |
ENV Summary: | |
TIME: Thu Jun 30 2022 15:53:11 GMT-0500 (Central Daylight Time) | |
TITLE: ember | |
ARGV: | |
- /Users/mattgardner/.nvm/versions/node/v12.22.7/bin/node | |
- /Users/mattgardner/.nvm/versions/node/v12.22.7/bin/ember | |
- test |
================================================================================= | |
ENV Summary: | |
TIME: Tue Jun 28 2022 20:42:33 GMT-0500 (Central Daylight Time) | |
TITLE: ember | |
ARGV: | |
- /Users/mattgardner/.nvm/versions/node/v12.22.7/bin/node | |
- /Users/mattgardner/.nvm/versions/node/v12.22.7/bin/ember | |
- s |
import Controller from '@ember/controller'; | |
export default class ApplicationController extends Controller { | |
appName = 'Ember Twiddle'; | |
} |
import { | |
validatePresence, | |
} from 'ember-changeset-validations/validators'; | |
export default function validatePresenceIf(options) { | |
const { withValue, on } = options; | |
return (...args) => { | |
const [,,, changes, content] = args; | |
const hasMatchingWith = (changes[on] || content[on]) === withValue; |
import buildMessage from 'ember-changeset-validations/utils/validation-errors'; | |
import { validate } from 'ember-validators'; | |
export default function validatePresence(options) { | |
let targets; | |
if (typeof options === 'boolean') { | |
options = { presence: options }; | |
} else if (options && options.on !== undefined) { | |
if (typeof options.on === 'string') { | |
targets = [options.on]; |
import Ember from 'ember'; | |
import AdultValidations from '../validations/adult'; | |
import ChildValidations from '../validations/child'; | |
import { reservedEmails } from '../validators/uniqueness'; | |
import { schema } from '../models/user'; | |
const { get } = Ember; | |
const { keys } = Object; | |
export default Ember.Controller.extend({ |
Goal
I'd like to mock the requests for tiles made by MapboxGL using Pretender.
Problem
Pretender doesn't intercept those requests
What I've discovered
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |