var foo = { [Symbol.hasInstance]: function () { return true; } };
var bar = {};

assert.ok(bar instanceof foo);
assert.ok(new String instanceof String);

//

function Greeting(greeting) {
  this.greeting = greeting;
}

Greeting[Symbol.hasInstance] = function(inst) {
  return inst.greeting == "hello";
};

var a = new Greeting("hello");
var b = new Greeting("world");

assert.ok(a instanceof Greeting);
assert.ok(!(b instanceof Greeting));

var foo = { [Symbol.hasInstance]: function () { return true; } };
var bar = {};

assert.ok(bar instanceof foo);
assert.ok(new String instanceof String);

//

function Greeting(greeting) {
  this.greeting = greeting;
}

Object.defineProperty(Greeting, Symbol.hasInstance, {
  value: function(inst) {
    return inst.greeting == "hello";
  }
});

var a = new Greeting("hello");
var b = new Greeting("world");

assert.ok(a instanceof Greeting);
assert.ok(!(b instanceof Greeting));

update es6.spec.symbols instanceof test to reflect Function.prototype[@@hasInstance] being nonwritable #1364