- App.tsx: full navigation (Auth stack + Main tabs with 5 screens) - Auth: LoginScreen, RegisterScreen, ForgotPasswordScreen - HomeScreen: dashboard with IoT metrics, weather widget, alerts, quick actions, sensors - MapScreen: interactive map with layer toggles (6 layers) - MarketplaceScreen: categories (6), products (5), search - ChatScreen: AI chat with quick prompts (4), bot responses - ProfileScreen: user info, stats, menu (9 items), logout - AlertsScreen: alert list with severity, acknowledge - SensorsScreen: sensor list with type filters (6 types), search - ZonesScreen: zone cards with stats - SettingsScreen: language picker (FR/EN/ES/DE), privacy, about - Stores: iotStore (sensors, zones, alerts), notificationStore, uiStore + i18n - Hooks: useSensors, useAlerts, useNotifications, useLocation - Components: Card, Button, LoadingSpinner, ErrorBoundary, Header - Services: iotService, notificationService (with axios API client) - Utils: formatters (temp, AQI, noise, dates), validators (email, password, IBAN) - Theme: colors.ts with full design system (Blue Ocean palette) - Ditto: fixed MongoDB connection, new JWT secrets, official gateway image
57 lines
1.3 KiB
JavaScript
57 lines
1.3 KiB
JavaScript
'use strict';
|
|
|
|
var $defineProperty = require('../');
|
|
|
|
var test = require('tape');
|
|
var gOPD = require('gopd');
|
|
|
|
test('defineProperty: supported', { skip: !$defineProperty }, function (t) {
|
|
t.plan(4);
|
|
|
|
t.equal(typeof $defineProperty, 'function', 'defineProperty is supported');
|
|
if ($defineProperty && gOPD) { // this `if` check is just to shut TS up
|
|
/** @type {{ a: number, b?: number, c?: number }} */
|
|
var o = { a: 1 };
|
|
|
|
$defineProperty(o, 'b', { enumerable: true, value: 2 });
|
|
t.deepEqual(
|
|
gOPD(o, 'b'),
|
|
{
|
|
configurable: false,
|
|
enumerable: true,
|
|
value: 2,
|
|
writable: false
|
|
},
|
|
'property descriptor is as expected'
|
|
);
|
|
|
|
$defineProperty(o, 'c', { enumerable: false, value: 3, writable: true });
|
|
t.deepEqual(
|
|
gOPD(o, 'c'),
|
|
{
|
|
configurable: false,
|
|
enumerable: false,
|
|
value: 3,
|
|
writable: true
|
|
},
|
|
'property descriptor is as expected'
|
|
);
|
|
}
|
|
|
|
t.equal($defineProperty, Object.defineProperty, 'defineProperty is Object.defineProperty');
|
|
|
|
t.end();
|
|
});
|
|
|
|
test('defineProperty: not supported', { skip: !!$defineProperty }, function (t) {
|
|
t.notOk($defineProperty, 'defineProperty is not supported');
|
|
|
|
t.match(
|
|
typeof $defineProperty,
|
|
/^(?:undefined|boolean)$/,
|
|
'`typeof defineProperty` is `undefined` or `boolean`'
|
|
);
|
|
|
|
t.end();
|
|
});
|