promises-aplus/promises-tests — pull request #47 by petkaantonov (2013-12-03 00:28:53+00:00)
Title: Test for whatever `this` values are actually given in the environment

I needed to do this when I created the browser version of tests for bluebird because e.g. ES3 browsers ignore `"use strict"` and would fail the hard coded comparison to `undefined`.

This instead detects at runtime for whatever value is given when a function that mentions `"use strict"` at the top is directly called.

It's probably more flexible than actually needed but yea.